Premium Only Content

Learn CSS: Simple Navigation Bar in CSS | Day 17 |
Visit - www.skyhighes.com
Simple Navigation Bar with CSS
Here's a simple navigation bar with CSS:
HTML:
HTML
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
Use code with caution. Learn more
CSS:
CSS
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
background-color: #f1f1f1;
}
nav ul {
list-style: none;
margin: 0;
padding: 0;
}
nav li {
display: inline-block;
margin: 0 10px;
}
nav a {
color: #333;
text-decoration: none;
padding: 5px 10px;
}
nav a:hover {
color: #000;
background-color: #ddd;
}
Use code with caution. Learn more
This code will create a horizontal navigation bar with three links: Home, About, and Contact. The navigation bar will be displayed across the full width of the browser window, with the links centered and spaced evenly. Hovering over a link will change its color and background color.
Here are some ways to customize this code:
Change the background color and font color of the navigation bar.
Add a border to the navigation bar.
Change the font family and size of the links.
Add a hover effect to the entire navigation bar.
Use font-awesome icons for the links.
Make the navigation bar responsive to different screen sizes.
-
LIVE
Bitcoin Magazine
3 days agoThe Bitcoin Conference 2025 | Day 3 Livestream
1,431 watching -
LIVE
Roseanne Barr
1 hour agoTales From The Other Side w/ Darius J. Wright| The Roseanne Barr Podcast #101
75 watching -
LIVE
Dr Disrespect
4 hours ago🔴LIVE - DR DISRESPECT - WARZONE - NEW SEASON 4!
2,664 watching -
LIVE
StoneMountain64
2 hours agoNew Downtown is HERE. MAX Battlepass Unlocked | Warzone Season 4
401 watching -
DVR
Badlands Media
1 hour agoRugpull Radio Special Episode - GMoney Live at Bitcoin Conference
3.39K -
1:51:18
Russell Brand
2 hours agoPizzagate Watch Along Part 2 - SF592
71.8K17 -
1:01:18
Sean Unpaved
2 hours agoTop 10 CFB QBs, Rory's Call Conundrum, & the NBA's New Age Era
17.3K -
43:07
Simply Bitcoin
3 hours ago $3.18 earnedMoney EXPERT Explains How $1M Bitcoin in 673 Days Happens! | EP 1255
50.1K3 -
1:04:19
Timcast
3 hours agoFBI WARNS Of Copycat ASSASSINATION Threats Against Trump Over Comey's "8647"
118K73 -
1:57:47
The Charlie Kirk Show
3 hours agoWhat a Difference a Year Makes + Court Blocks Tariffs + UK Revolution | Carney, Hammer, Leo | 5.29
51.8K16