- Home
- /
- CSS Navigation Bar
CSS Tutorial
Introduction
CSS Properties
CSS Designing
CSS Advance Topics
CSS FAQs
- Home
- /
- CSS Navigation Bar
CSS Navigation Bar
A navigation bar (navbar) is the backbone of any website’s layout. It helps users move between pages easily and sets the first impression. In this lesson, we’ll recreate the Learn With Arshyan navbar using HTML and CSS.
Let’s create a Registration Form and style it beautifully with CSS.
HTML Structure
Here’s the base HTML layout for the navbar:
Navbar – Learn With Arshyan

CSS Styling
Now let’s add CSS to bring the navbar to life with your desired style:
/* General Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
/* Navbar Container */
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 40px;
background-color: #fff;
border-bottom: 1px solid #eee;
position: sticky;
top: 0;
z-index: 1000;
}
/* Logo Area */
.logo {
display: flex;
align-items: center;
gap: 10px;
}
.logo img {
width: 50px;
}
.logo span {
font-size: 16px;
font-weight: 700;
color: #222;
}
.logo .highlight {
color: #6a0dad;
}
/* Navigation Links */
.nav-links {
display: flex;
list-style: none;
gap: 25px;
}
.nav-links a {
text-decoration: none;
color: #1a1a1a;
font-weight: 500;
padding: 8px;
transition: color 0.3s ease;
}
.nav-links a:hover {
color: #6a0dad;
}
/* Right-side Icons */
.icons {
display: flex;
align-items: center;
gap: 15px;
}
.icons .dark-mode-toggle,
.icons .search-icon {
border: none;
background-color: #6a0dad;
color: #fff;
width: 35px;
height: 35px;
border-radius: 50%;
cursor: pointer;
font-size: 18px;
}
.icons .cart {
font-size: 20px;
color: #000;
}

Final Tip – Learn With Arshyan
Your navbar is the first thing users interact with — make it simple, clean, and mobile-ready!