CSS - Navigation Bar

Navigation Bar

In this tutorial, I will be showing you how to create navigation bar.

Basic navigation bar comprises of Home, About, Services and Contact. There are two (2) types of navigation bar: Vertical and Horizontal

Vertical Navigation Bar

STEP 1 (Code the HTML) - Here we are using underordered list and anchor element.

STEP 2 (Code the CSS) - Here we are using embedded styling method to add our CSS.

STEP 3 - Make a hover effect and make the home menu to be active.

STEP 4 - You can make the hover effect not to be applied to the home by changing the code.

STEP 5 - You can add other styling as wish such as: font-family, font-variant, transition, etc.

Horizontal Navigation Bar

STEP 1 (Code the HTML) - Here we are using underordered list and anchor element.

STEP 2 (Code the CSS) - Here we are using embedded styling method to add our CSS.

STEP 3 - Make a hover effect and make the home menu to be active.

STEP 4 - You can make the hover effect not to be applied to the home by changing the code.

STEP 5 - You can add other styling as wish such as: font-family, font-variant, transition, etc.

Move Link To The Right

To move a particular link to the right, simply add the style below.

Fix Navigation Bar At The Top

To make navigation bar stay fixed at the top while scrolling down the page, simple style below

Fix Navigation Bar At The Bottom

To make navigation bar stay fixed at the bottom while scrolling down the page, simple style below

Make Navigation Bar Sticky

To make navigation bar sticky, simply add the style below.

ADVERTISEMENTS

LEARNING IS A CONTINOUS PROCESS - PRACTICE MAKES PERFECT