0
What is the css3 and html5 coding for media query? Cant remember how to change the coding the make.it look good on mobile form
6 Answers
+ 6
@media screen and (max-width: 430px) {
/* CSS codes for mobile here */
}
any screen lower than 430px will surely use the code of the media query above. You could also change the max-width.
+ 5
@Oeoes Roy you are right. @Andrew Lee I'm not sure what the problem might be, but make sure the media query code is last(bottom) of the cascading style sheet. Also you could just write it this way, without the screen it still works:
/* Mobile */
@media and (max-width: 520px) {
*css code here*
}
/* Large Screens */
@media and (min-width: 521px) {
*css code here*
}
Or I suggest you post it here so we all help you, thanks.
+ 4
yeah it's correct
+ 1
@media screen and (min-width :430px){
//Css code
}
And any screen "higher" than 430px will use this media query code, isn't it? @Ben Bright CMIIW
0
so id type:
@media screen and (max-width: 430px) {
*enter css here*
}
is this correct?
0
Ben, I tried it. doesnt work. Am I missing something from html that I should put in?