+ 1
I have a problem Media querys
I wrote a Media query in css and it's not working, it's not even getting recognized by my text editor !
7 Answers
0
Did you place the query directly underneath the original selector for that element? That's the only way that they will work, so I would recommend trying something out like this:
#element{
}
@media screen and (min-width:500px){
#element{
}
}
+ 1
yes I did but the problem was that it was not recognizing the min_width parameter that I was using, I don't know what exactly happened but when I restarted my text editor and my local Host it worked :p
+ 1
can I ask you a question about your code ?
+ 1
what's screen and for i write my Media querys without it
+ 1
Screen basically just defines that the query will only come into effect with something that is typically an RGB screen (which primarily includes phones and computers). It isn't something mandatory, but it just makes sure that it doesn't take into effect for other media types. d:
+ 1
ohh wow that's interesting
ok thank you so much :)
+ 1
khalil alla No problem! ;)