Design comparison
Solution retrospective
I have a problem with the media queries it does not override the original code when I adjust the screen size?
Community feedback
- @nakoyawilsonPosted almost 3 years ago
I took a look at your css file and I think if you use min-width/max-width for the media query that's currently commented out the media query should work.
@media (min-width: 240px) and (max-width: 375px) { ... }
0@HossamGoudaPosted almost 3 years ago@nakoyawilson
That is making me wonder because it is not working too.
0@nakoyawilsonPosted almost 3 years ago@HossamGouda I also noticed that you just repeated the original styles in the media query instead of changing properties so when I downloaded your code I added a red border around the content to check see when the media queries worked. If you want a property to change you need to change it instead of just leaving it out of the media query. For example I noticed your original style for .title has font-weight and font-size but the media query excludes those properties but no changes are made to the properties you list. If your goal in the media query is to change the font weight and size, then instead of excluding those properties and repeating the properties you do want you need to put the changes you want to take place in the media query. Example:
@media (min-width: 240px) and (max-width: 375px) { .title { font-weight: new font weight; font-size: new font size; } }
Marked as helpful1@HossamGoudaPosted almost 3 years ago@nakoyawilson Thanks for your helpful comment This solved the issue I did not change the properties of the position to static so I did not notice any changes and thought it was not working. now it is became responsive
0@nakoyawilsonPosted almost 3 years ago@HossamGouda You're welcome! I'm glad you were able to solve the problem.
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord