CSS navigation bar with stylish web2.0 elements

Marino from TechSymptom is great web-designer and started a series of Fireworks tutorials on web 2.0 styled navigation bars. The last one inspired me to create this small CSS tutorial.

UPDATE: Based on the tutorials from techSyptom we created a new tutorial, check the tutorial link below.

After we finished the design tutorial we need to create 2 simple images to style our CSS navigation bar: A background image (the light blue bar) and a transparent button that indicate the active state, all other elements are created with CSS.

Like in most CSS horizontal navigation bars an unordered list is used to hold the menu items:

screen.jpg
With the next CSS code it’s possible to style the horizontal navigation bar:

We placed the background image behind “ul” element and added the two borders to the top and bottom. The li element is defined as a floated block element and got some padding to create a bigger button. The last definition is for the current state, which will show up the tri-angle. You need some server-side code (php) to get a dynamic position every time a different page is loaded.

That’s all, download the example files here.

3 thoughts on “CSS navigation bar with stylish web2.0 elements

  1. Nice tutorial, Olaf.
    It’s really great that you wrote the process of “exporting” the menu into a website. The code is simple and the result is great. Of course, thanks for using my tutorial in yours. :)

  2. Nice, great job. It would alsov be nice if you could upload a working example on some server so we could see ti in action :)

  3. if you place padding:0; into the ul#navbar definition it will correct the extra blank space that is generated when this is viewed in firefox (my version is 2.0.0.3)

Comments are closed.