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
Candace Show Podcast
47 minutes agoShannon Sharpe Out At ESPN. I Taylor Swift Subpoena Incoming. | Candace Ep 182
3,512 watching -
36:41
Kimberly Guilfoyle
1 hour agoBorder Security is National Security, Interview with Tyler O'Neil | Ep216
12.5K4 -
1:12:19
Dr. Drew
1 day agoLIVE From Washington DC w/ Harmeet Dhillon & DOJ Attorney Michael Gates – Ask Dr. Drew
14.7K5 -
LIVE
LFA TV
19 hours agoALL DAY LIVE STREAM - 4/24/25
1,056 watching -
2:20:24
The Quartering
4 hours agoBombshell Karmelo Anthony Update, Star Wars New Low, Gays Buying Babies Nintendo Switch Drama & More
117K32 -
1:16:43
Roseanne Barr
3 hours ago $6.10 earnedAnd Gad Saad let there be light | The Roseanne Barr Podcast #96
26.1K10 -
LIVE
Akademiks
3 hours agoDay 9/30. Shannon Sharpe Own Homies Turning They back on him? Uzi Rushed to Hospital? Lil Durk Bond
2,251 watching -
37:50
Friday Beers
17 hours ago $0.28 earnedWho Died in Our First Dungeons and Dragons Battle? (Ft. Almost Friday TV)
10.2K2 -
LIVE
The HotSeat
1 hour agoCollapse of Common Sense: What the Hell Happened to Minnesota?
879 watching -
11:08
Talk Nerdy Sports - The Ultimate Sports Betting Podcast
1 hour ago4/24/25 - No One’s Safe: NBA Blowouts, MLB K Bombs, and NHL Kill Shot
5.82K