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

16th Jun 2022, 9:56 PM
steve Purpose
steve  Purpose - avatar
13 odpowiedzi
+ 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) { ... }
16th Jun 2022, 10:56 PM
Calviղ
Calviղ - avatar
+ 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).
16th Jun 2022, 11:43 PM
Calviղ
Calviղ - avatar
+ 1
steve Purpose you need a "space character" in front of the parentheses indicate the screen size like this: @media screen (max-width:470px) {}
16th Jun 2022, 10:53 PM
Thống Nguyễn
Thống Nguyễn - avatar
+ 1
This space "and (max-width:450px)".
16th Jun 2022, 10:59 PM
Thống Nguyễn
Thống Nguyễn - avatar
+ 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)"
16th Jun 2022, 11:04 PM
Thống Nguyễn
Thống Nguyễn - avatar
+ 1
Ok..Thanks a lot 🙏..let me try it
16th Jun 2022, 11:09 PM
steve Purpose
steve  Purpose - avatar
+ 1
Ok.it worked Thống Nguyễn .I appreciate
17th Jun 2022, 5:27 AM
steve Purpose
steve  Purpose - avatar
+ 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.
17th Jun 2022, 8:48 AM
Calviղ
Calviղ - avatar
+ 1
Thanks all the same..I solved the issue long ago..All I needed was space before brackets
19th Jun 2022, 7:35 PM
steve Purpose
steve  Purpose - avatar
0
Which of the parentheses Thống Nguyễn .. The curly braces or bracket
16th Jun 2022, 10:56 PM
steve Purpose
steve  Purpose - avatar
0
I don't really get your point
16th Jun 2022, 11:00 PM
steve Purpose
steve  Purpose - avatar
0
Calviղ I don't want to use framework for this particular job
17th Jun 2022, 5:28 AM
steve Purpose
steve  Purpose - avatar