+ 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 !

31st May 2018, 1:26 AM
khalil alla
khalil alla - avatar
7 Respuestas
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{ } }
31st May 2018, 1:41 AM
Faisal
Faisal - avatar
+ 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
31st May 2018, 2:12 AM
khalil alla
khalil alla - avatar
+ 1
can I ask you a question about your code ?
31st May 2018, 2:18 AM
khalil alla
khalil alla - avatar
+ 1
what's screen and for i write my Media querys without it
31st May 2018, 2:19 AM
khalil alla
khalil alla - avatar
+ 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:
31st May 2018, 2:28 AM
Faisal
Faisal - avatar
+ 1
ohh wow that's interesting ok thank you so much :)
31st May 2018, 2:31 AM
khalil alla
khalil alla - avatar
+ 1
khalil alla No problem! ;)
31st May 2018, 2:35 AM
Faisal
Faisal - avatar