I can’t get my media query to work. It seems like the syntax is correct – I’ve even copy+pasted the media query from another website but the console doesn’t recognize my max-width pixel input.
html, body {
font-family: 'Open Sans', sans-serif;
line-height: 1.5;
min-width: 290px;
}
header {
color: black;
margin: 10px;
text-align: center;
font-size: 1.8em;
}
#main-doc header {
text-align: left;
margin: 0px;
li {
margin: 15px 0 0 20px;
}
.indent-list {
margin-left: 5%;
}
#navbar {
position: fixed;
min-width: 290px;
top: 0px;
left: 0px;
width: 300px;
height: 100%;
border-right: solid;
border-color: rgba(0, 22, 22, 0.4);
}
#navbar a {
display: block;
padding: 10px 30px;
color: #4d4e53;
text-decoration: none;
cursor: pointer;
}
.nav-link {
height: 100%;
width: 200px;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: white;
overflow-x: hidden;
padding-top: 10px;
}
.nav-link a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: black;
display: block;
transition: 0.3s;
}
main {
margin-left: 200px;
padding: 20px;
}
#navbar ul {
height: 88%;
padding: 0;
overflow-y: auto;
overflow-x: hidden;
}
body {
fbc-blue-60: #0060df;
--fbc-blue-70: #003eaa;
--fbc-gray-20: #ededf0;
--fbc-light-gray: #F0F0F4;
--fbc-white: #ffffff;
--fbc-transition: all .15s cubic-bezier(.07,.95,0,1);
--fbc-borders: 1px solid #ededf0;
--fbc-primary-text: #15141A;
--fbc-secondary-text: #5B5B66;
--fbc-font-size: 13px;
}
section article {
color: #4d4e53;
font-size: 0.96em;
}
@media screen and (max-width: 600px) {
#navbar ul {
border: 1px solid;
height: 207px;
}
#navbar {
background-color: white;
position: absolute;
top: 0;
padding: 0;
margin: 0;
width: 100%;
max-height: 275px;
border: none;
z-index: 1;
border-bottom: 2px solid;
}
#main-doc {
position: relative;
margin-left: 0px;
margin-top: 270px;
}
}
code {
margin-left: -20px;
width: 100%;
padding: 15px;
padding-left: 10px;
padding-right: 45px;
min-width: 233px;
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0
Challenge: Responsive Web Design Projects - Build a Technical Documentation Page
Link to the challenge: