0
Please why is my css media query not responsive?
Testing this css media query ,with a mobile first design approach ,but it's not responsive.Not working neither on mobile or pc.please what did I not do right https://code.sololearn.com/WizU90nWpAG1/?ref=app
12 Answers
+ 3
You can follow media query that set for Bootstrap CSS framework.
// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) { ... }
// Medium devices (tablets, 768px and up)
@media (min-width: 768px) { ... }
// Large devices (desktops, 992px and up)
@media (min-width: 992px) { ... }
// X-Large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }
// XX-Large devices (larger desktops, 1400px and up)
@media (min-width: 1400px) { ... }
+ 3
steve Purpose it's advisable not to mix min-width with max-width on a set of media queries.
Choose one of the settings based on whether you prefer mobile first (min-width) or desktop first method (max-width).
+ 1
steve Purpose you need a "space character" in front of the parentheses indicate the screen size like this:
@media screen (max-width:470px) {}
+ 1
This space "and (max-width:450px)".
+ 1
You must to write "and (max-width:450px)"
See i have a space between the word "and" and the parentheses.
instead of "and(max-width:450px)"
+ 1
Ok..Thanks a lot 🙏..let me try it
+ 1
Ok.it worked Thống Nguyễn .I appreciate
+ 1
steve Purpose I didn't mention that you should use the framework.
What I actually meant was studying how the framework uses media queries to achieve its job, you can use this exact same method.
Anyway if anyone uses the framework in fact don't need to understand its media queries code works.
+ 1
Thanks all the same..I solved the issue long ago..All I needed was space before brackets
0
Which of the parentheses Thống Nguyễn .. The curly braces or bracket
0
I don't really get your point
0
Calviղ I don't want to use framework for this particular job