AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

Top navigation bar HTML CSS


<< Previous Page
HTML comment
Next Page >>
div class container

How to » Top navigation bar HTML CSS

Study in this chapter:
1. - What is top navigation bar menu?
2. - What are the types of navigation bar?
3. - top / horizontal navigation / nav bar html template, css code

1. The top navigation for your site is the horizontal red bar that lists sections or pages of your website. In many cases, the top navigation includes dropdown menus that display subpages of sections as well.

2. Let's look at a few of the most common types of website navigation you can choose from

We can add CSS style to horizontal navigation / nav bar as:
Internal Style - by using a <style> element in the <head> section
External Style - by using an external CSS file as style.css

Example:

 

CSS code - top / horizontal navigation / nav bar

responsive navigation menu css

Example:
body {
margin: 4px;
font-family: Arial, Helvetica, sans-serif;
}

.topnav {
overflow: hidden;
background-color: #006;
}
.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}

.topnav a:hover {
background-color: #E9E9E9;
color: black;
}

.topnav a.active {
background-color: #04AA6D;
color: white;
}

Related subjects:
Sidebar navigation with scroll bar How to Create a Sticky Navbar Table HTML

 

Horizontal responsive navigation bar HTML

horizontal responsive navigation bar HTML example

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
margin: 4px;
font-family: Arial, Helvetica, sans-serif;
}

.topnav {
overflow: hidden;
background-color: #006;
}

.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}

.topnav a:hover {
background-color: #E9E9E9;
color: black;
}

.topnav a.active {
background-color: #04AA6D;
color: white;
}
</style>
</head>
<body>

<div class="topnav">
<a class="active" href="#home">Home</a>
<a href="#news">News</a>
<a href="#services">Services</a>
<a href="#contact">Contact</a>
</div>

<div style="padding-left:16px">
<h2>Top Navigation bar Example</h2>
<p>Your website content ..</p>
</div>

</body>
</html>

 

Tags: top navigation bar html, code, css template, fixed, insert image in top navigation bar with logo, dropdown menu, html responsive top navigation bar, how to move navigation bar to the top html

 

Insert image in top navigation bar html

How to add logo on navigation bar in HTML Example

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
margin: 4px;
font-family: Arial, Helvetica, sans-serif;
}
.logo-image{
width: 46px;
height: 46px;
border-radius: 50%;
overflow: hidden;
margin-top: -6px;
}
.topnav {
overflow: hidden;
background-color: #006;
}

.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}

.topnav a:hover {
background-color: #E9E9E9;
color: black;
padding-top: 26px;
padding-bottom: 26px;
}

.topnav a.active {
background-color: #04AA6D;
color: white;
padding-top: 26px;
padding-bottom: 26px;
}
</style>
</head>
<body>

<div class="topnav">

<a class="navbar-brand" href="/">
<div class="logo-image">
<img src="image" class="img-fluid">
</div>
</a>

<a class="active" href="#home">Home</a>
<a href="#news">News</a>
<a href="#services">Services</a>
<a href="#contact">Contact</a>
</div>

<div style="padding-left:16px">
<h2>Insert image in top navigation bar - Example</h2>
<p>Your website content ..</p>
</div>

</body>
</html>

 

Summary of description

 

<< Previous Page
HTML Button Style
Next Page >>
HTML Button Action

 



top navigation bar examples, design, website, html template, css template
Top navigation bar HTML CSS - how to

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


0
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Upload Image, display, edit and delete i...
Login Form with Image background...
How to Create an Image with Transparent ...
Portfolio Gallery Website with filtering...
Simple pagination script PHP MySQLi...
Center Image in div...
Image Hover Overlay Fade...
Sticky image / element / div on scroll...
Responsive images...
Create rounded image in HTML CSS...
Add border around image...
Position Text Over an Image HTML CSS res...
Create a Slideshow Images Gallery...
Create a Sticky Sidebar...
Search bar using CSS HTML...
Shrink Navigation Menu on Scroll...
How to Create Accordion HTML Templates...
Dropdown menu in the navigation bar...
Responsive Top Navigation Bar with mobil...
Split horizontal navigation bar...