|
|
![]() |
|||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
|
|
|
|
|
![]() |
||||||||||||||||||||
| PORTFOLIO | RESOURCES | DESIGNS | TUTORIALS | GOODIES | ||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||
<ul> <li><a href="#">Home</a></li> <li><a href="#">Graphics</a></li> <li><a href="#">Layouts</a></li> </ul> </div> Result: * If you only use the html part of the code and not the css part, then you will see that your navigation will appear as a bulleted list of links. Now you see why the css component is necessary. Add as many extra bullets as you deem necessary.
{ list-style: none; padding: 0; margin: 0; } * This css rule erases the bullets. Do not edit.
{ margin: 0px; padding:0px; text-decoration: none; } * Set the margin and padding of your links. Leave them at 0 if you don't want any padding or margin.
display: block; height: 28px; width: 140px; border: 1px solid #AFA4FF; background: url(activebg.gif) repeat #FFFFFF; text-align: center; padding-top: 10px; text-decoration: none; color: #6A7D96; font-weight: normal; } * The display: block command tells it to display the boxes on top of each other. You can specify the height and width of the boxes, even give it a border if you want. #FFFFFF is the hex code for the color 'white'. To find the hex code for other colors, check out this color wheel (IE only). The background command tells what the background of the boxes will be. Place the URL of the background you want to use in between the parantheses. Here is the background image I used... Leave the parentheses blank if you do not want a background image, and instead change the hex code #FFFFFF to the color that you want to serve as the background-color of your boxes. The text-align command tells whether you want the text to pe placed on the left, center, or right, while the padding-top command tells how many pixels from the top of the box the text will be placed. Note: Be aware that increasing the padding will increase the width/height of your box. I have a padding of 10px. To ensure that the padding wont strecth my box, I had to use a different height of 28px even though the actual height of the background is 38px. Next changing the hex code in the color command will change the text color. Changing the font-weight command to bold will make the text bold if you choose to do so.
{ color: #6D09C1; border: 1px solid #A434FF; background: url(hoverbg.gif) repeat #000000; } * This css rule changes the look of the boxes when someone hovers their mouse over them. If you are using a background, you can use an alternate background or the same one that you used for the active rule. I used an alternate background...
If you want the menu bars to line up side-by-side instead of on top of each, add the float:left; command under the #nav-menu li rule.
Tutorial by: Nika
Last Modified: 08/14/08. |
October 18 2008: Added 6 New Transparent PNGs!
October 4 2008: Added One New Div Layout and 2 New Transparent PNGs!
Users Online |
|||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|||||||||||||||||
|
AFFILIATES
[ Apply to be here ]
|
|
|