16/09/08 at 22:42

Advanced Navigation

Posted Under: Tutorials

Today I’ll be teaching you guys on how to design and code advance css navigation. The navigation that I’m going to teach you is a glossy horizontal navigation.

If you haven’t read my basic css navigation tutorial, click on the link bellow to learn on how to make your own css navigation.

Basic CSS Navigation

VIEW DEMOAdvanced Navigation

Step 1
Open your photoshop and create new file. Set the width to width 500px and Height 30px. Press letter U in your keyboard to use shape tool but choose only the rounded tool and set the radius to 20px.

Step 2
Will now add new layer style for navigation. Go to blending option and choose gradient overlay. You can give any color you want for your glossy navigation so before you choose the right color make sure that the two colors will almost match.

Step 3
Hold press CTRL and click on the layer to select a perfect rounded side marquee tool on your layer and then hold press ALT to delete the top part of the marquee. Don’t deselect the marquee as of now make a new layer above the first layer and go to your gradient tool to choose your own color.

Click the image bellow to enlarge.

Step 4
And now let’s create one part of the navigation to make it a glossy navigation. Repeat the same as above by holding CTRL on the first layer, create new layer and put it above the second layer then delete the bottom part of the selected layer marquee.

Change the opacity of the layer 3 to 50% and set the layer property to screen.

Press CTRL+ALT+C to open canvas option and do the same option i did in the image bellow.

Duplicate your glossy navigation bar and do it same as the image bellow.

Step 5
Then let’s add some text as your navigation together with the hover effect. Make sure the text is aligned in the center.

What you see above there is only one hover effect so make more for the others and do the same bellow.

Step 6
Select one of the hover effect layers and go to blending tool then gradient overlay. The angle should be -90 degree and default gradient color, change the black to lighter one, change it to grey. And select overlay for the blending mode and opacity to 75%. To make your work faster for doing the same for the other hover effect layers, right click on the layer with the blending option settings and copy layer style then right click on the other hover effect layer and click on paste layer style.

Step 7
In this step will start coding in html. And what we are going to use is unordered list.

<ul id="navigation">
<li class="home"><a href="#">Home</a></li>
<li class="about"><a href="#">About</a></li>
<li class="photos"><a href="#">Photos</a></li>
<li class="blog"><a href="#">Blog</a></li>
<li class="contact"><a href="#">Contact</a></li>
</ul>

Step 8
This next step is coding the basic in CSS code for the navigation. So read carefully especially the comment part.

ul#navigation{
	margin:0;
	padding:0;
}
ul#navigation li{
	margin:0;
	padding:0;
	list-style:none;
	float:left;
}
ul#navigation li a{
	margin:0;
	padding:0;
	width:100px; /*All link width are set to 100 pixels*/
	height:30px; /*All link height are set to 30 pixels*/
	text-indent:-2000px; /*Move your text link to 2000 pixels to the left*/
	float:left;
	outline:none;
}

Step 9
Let’s start inserting the image into your unordered list. If you notice the coordinates of 0 0 to -400 0; it is use to position your image navigation to display properly. The first digit is for the left position and the second digit is top position. I used negative coz if the position is set to 0 0, means the image is starting from the left part of the image navigation. So by displaying the second menu properly, you need to give it a negative coordinates for the left position. Then do it the same as the other menu but don’t forget using basic math for the positioning of your menu. Coz all width is set to 100 pixels.

ul#navigation li.home a{
	background:url(09.jpg) no-repeat 0 0;
}
ul#navigation li.about a{
	background:url(09.jpg) no-repeat -100px 0;
}
ul#navigation li.photos a{
	background:url(09.jpg) no-repeat -200px 0;
}
ul#navigation li.blog a{
	background:url(09.jpg) no-repeat -300px 0;
}
ul#navigation li.contact a{
	background:url(09.jpg) no-repeat -400px 0;
}

Step 10
For the final step, let’s start the hover effect of the image navigation guys. Just copy the code above and paste it in a new line then change the second digit to -30px and then it’s all done. You advanced navigation is ready to go.

ul#navigation li.home a:hover{
	background:url(09.jpg) no-repeat 0 -30px;
}
ul#navigation li.about a:hover{
	background:url(09.jpg) no-repeat -100px -30px;
}
ul#navigation li.photos a:hover{
	background:url(09.jpg) no-repeat -200px -30px;
}
ul#navigation li.blog a:hover{
	background:url(09.jpg) no-repeat -300px -30px;
}
ul#navigation li.contact a:hover{
	background:url(09.jpg) no-repeat -400px -30px;
}
Add to:
  • Digg
  • del.icio.us
  • Technorati
  • YahooMyWeb
  • Google
  • StumbleUpon
  • TwitThis
  • description
  • Facebook
  • LinkedIn
  • MySpace
  • Print this article!
  • Tumblr
  • Yahoo! Buzz

18 Comments on “Advanced Navigation”

astig.hehehe sana post ka pa ng mga tutorial…

[...] Original post from Dodski [...]

This is great keep them coming
we need more

hoy budoy…. diin mo nangaon atong ni agi katong wala ko naka kuyog ninyo ni mark???? og thank you sa food and sa blessings imo gi share…. a great friend and a mentor…. but sometimes, scold me…. bwahahahaha…. bai, FOODTRIP nya ta…. and bout’ sa imong mga tutorials, PRO na…. pag teacher nalang para dako pa imong kita then, manglibre napud ka namo…. bwahahahaha…. TC and God bless bai…. lamatz….

SM natural. ngano bitaw ala mo kuyog. hehehehe

[...] Dodski Archivado en: Photoshop, Tutoriales Photoshop, css, css, menu, Menu [...]

Thank you for your website :-)
I made on photoshop backgrounds for myspace and youtube and whatever
my backgrounds:http://tinyurl.com/6exhae
all the best and thank you again!

thanks man… malaking 2long to… en taga asa ka by davao? cedu?

idol ni! salute kog ka lima ani.. =)

pytera oi.. wow

Heheh.. Thanky thanky guys.. Still more tuts to come. hehe :D

Set the width to width 500px and Height 30px. …..you shure? if I put 30 it s like as thin as a piece paper

@Theo – Sorry mate, I don’t know how you set it to 30px. Coz 30px is not like thin as paper, try to do it again and make sure you have chosen pixels in setting the height or width.

how do I code this, what do I use? Do I use Photoshop to do it?

@Rick – You will need photoshop to design your menu and use notepad or dreamweaver for CSS coding.

Can I put this in my blogger HTML code? I’d really like a neat nav bar up top on my blog but I’m not sure if it’ll work.

Thanks for all your time putting this together!

@carly – OK. Your free to use it. That’s up to you if you’ll give me a credit by linking back to my site.

nice

Leave a Comment to this post.

You must be logged in to post a comment.

eXTReMe Tracker