Rajitha Rajitha - 4 months ago 13
CSS Question

I want screen resolution at particular width in css?

I want red colour when my screen resolution is between 1250px to 1350px .
Below is my code:

<style>
@media screen and (max-width: 1250px){
.navigation .menu .sub-menu .sub-menu {
background-color: red;
}
}
</style>

Answer

Not much magic. You pretty much just write down what you want to do:

<style>
@media screen and (min-width: 1250px) and (max-width: 1350px){
.navigation .menu .sub-menu .sub-menu {
background-color: red;    
 }
}
</style>
Comments