been trying to do a Nav bar, though through live stream it the @.media command does not effect my coding, no idea why. it should just keep a home sign in mobile state, though it does not effect it all. using chrome browsers, Brackets.
help me please.
----------------------------------------------------------------------- css stylesheet
/*#################Defults############*/
nav,
header,
footer {
display: block;
}
body {
line-height: 1;
margin: 0;
}
/*################Nav Bar##################*/
nav {
width: 100%;
margin: 0;
}
nav ul {
background-color: #eee;
overflow: hidden;
margin: 0;
padding: 0;
}
ul.topnav li {
list-style: none;
float: left;
}
ul.topnav li.topnav-right {
float: right;
}
ul.topnav li a {
display: block;
text-decoration: none;
min-height: 16px;
text-align: center;
padding: 14px;
text-transform: uppercase;
color: #666;
}
ul.topnav li a:hover {
background-color: #0080ff;
color: #fff;
}
ul.topnav li.dropdownIcon {
display: none;
}
/*################# mobile #############*/
u/media screen and (max-width: 680px) {
ul.topnav li:not(:nth-child(1)) {
display: none;
}
}
<!doctype html>
<html lang="en">
<head>
<title> MY CSS website</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav>
<ul class="topnav">
<li><a href="#home>">Home</a></li>
<li><a href="#news>">News</a></li>
<li><a href="#contact>">Contact</a></li>
<li><a href="#about>">About</a></li>
<li class="topnav-right"><a href="#signup>">Sign Up</a></li>
<li class="topnav-right"><a href="#signin>">Sign In</a></li>
<li class="dropdownIcon"><a href="">\☰
</a></li>
</ul>
</nav>
</body>
</html>