Hello,
I am currently developing a site and I am trying to get into more css coding, I have go the basic css for the navigation done. Although what I want to do now is Make sub menus, so when you roll over one of the buttons. The menus appear.
Sub-menus can be a little complicated. I'll try to give you the short version, and you can fill in the blanks with your own styles.
<div id="navigation">
<ul>
<li><a href="#">blah</a></li>
<li><a href="#">blah blah</a></li>
<li><a href="#">sub menu here</a>
<ul class="drop-down">
<li><a href="#">sub-menu item</a></li>
<li><a href="#">sub-menu item 2</a></li>
</ul> </li>
<li>......</li>
Define the background or not, background color, float:left of sub-menu items, padding, etc., in your css file.
Sample CSS
ul#navigation ul.drop-down {
position:absolute;
top:40px; /*how far away from the top menu*/
margin:0;
padding:12px 10px 8px 10px;
width:230px;
background-color:#161616;
}
ul#navigation ul.drop-down li {
margin:0;
list-style:none;
display:inline;
}
ul#navigation ul.drop-down a {
position:relative;
list-style:none;
display:inline;
float:none;
border:none;
padding:6px 0px 8px 0px;
background:none;
font:12px Verdana, Copse, arial, serif;
line-height:1.6em;
color:#fff;
/*border-top:2px solid #000;*/
text-transform:none;
}
This is nowhere near complete, I'm just trying to give you the idea. Notice the </li> of the menu item with the drop down menu is placed below the second ul li items.
Bookmarks