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

24th Jul 2017, 8:48 PM
Andrew Lee
Andrew Lee - avatar
6 ответов
+ 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.
24th Jul 2017, 9:05 PM
Benneth Yankey
Benneth Yankey - avatar
+ 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.
25th Jul 2017, 5:05 AM
Benneth Yankey
Benneth Yankey - avatar
+ 4
yeah it's correct
24th Jul 2017, 9:08 PM
Benneth Yankey
Benneth Yankey - avatar
+ 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
24th Jul 2017, 11:04 PM
Oeoes Roy
Oeoes Roy - avatar
0
so id type: @media screen and (max-width: 430px) { *enter css here* } is this correct?
24th Jul 2017, 9:07 PM
Andrew Lee
Andrew Lee - avatar
0
Ben, I tried it. doesnt work. Am I missing something from html that I should put in?
24th Jul 2017, 11:07 PM
Andrew Lee
Andrew Lee - avatar