I am stuck on the Technical Documentation Page in the media queries part. This is my CSS code, /* Reset default margin and padding for body */
body {
margin: 0;
padding: 0;
}
/* Navbar styling */
#navbar {
background-color: #333 ;
color: white;
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
}
.nav-link {
text-decoration: none;
color: white;
margin: 0 1rem;
}
/* Main content styling */
#main-doc {
padding: 2rem;
}
.main-section {
margin-bottom: 3rem;
}
/* Media query for screens with max width 600px */
@media (max-width: 600px) {
#navbar {
flex-direction: column;
align-items: center;
}
.nav-link {
margin: 0.5rem 0;
}
}
the media query i wrote is not passing
Challenge: Technical Documentation Page - Build a Technical Documentation Page
Link to the challenge:
Learn to Code — For Free
Viv01
August 8, 2023, 11:38am
2
please describe what’s the issue
It is showing you should at least one media query even though i wrote the media query
Viv01
August 8, 2023, 11:53am
4
had you nested #navbar and .nav-link in media quarry?
/* Media query for screens with max width 600px */
@media (max-width: 600px) {
#navbar {
flex-direction: column;
align-items: center;
}
.nav-link {
margin: 0.5rem 0;
}
}
Viv01
August 8, 2023, 12:05pm
6
can you share html please
I am not able to share the html because it is not allowing and saying that only 2 links per post for the new user, I don’t know what does it means
Viv01
August 8, 2023, 3:30pm
11
@media screen and (max-width: 600px){
}
try this code at once
nope it’s not working as expected, actually, the code is also not reflected as expected in the freecodecamp itself, but it is working fine in the vs code when I run it in the Chrome browser
Viv01
August 8, 2023, 4:22pm
13
yes bro, this is can’t understand why this code is not submitting
system
Closed
February 7, 2024, 4:22am
14
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.