I've been working with a lot of CSS techniques for almost ten years now and it is centering a list menu that has always bugged me. So here are the rules for it:
/*centered naviation*/
#navigation_centered{
text-align:left;
left:50%;
position:relative;
float:left;
}
#navigation ul#nav_centered{
left:-50%;
position:relative;
border-left:#D5C06D 1px solid;
float:left;
}
#navigation ul#nav_centered li{
float:left;
position:relative;
list-style:none;
border-right:#D5C06D 1px solid;
}
#navigation ul#nav_centered li a{
float:left;
padding:7px 10px 8px;
}
/*end of centered navigation*/
And the html should look something like this:
<div id="navigation_centered">
<ul id="nav_centered">
<li><a href="#">Nam </a></li>
<li class="selected"><a href="#">odio </a></li>
<li><a href="#">orci </a></li>
<li><a href="#">fringilla</a></li>
</ul>
</div>
I can't remember where I got this, but I also seem to remember I read this somewhere with a CSS book published by sitepoint.com. I'll get to the explaining part maybe in my next post.
Cheers...
Tuesday, March 31, 2009
April Fo0ls day
A virus today is suppose to hit a lot computers, called the Conficker virus. Right now so far so good my laptop is fine and so is my PC here at the office I work with. Currently updating my java software when all of a sudden spybot search and destroy prevented the installation of jqs.exe, well it thinks that it is a malicious software but it isn't... darn it too late already allowed spybot to delete it. An article about jqs.exe here; http://www.ghacks.net/2008/12/15/jqsexe/
I'm going to write about horizontal list menus a little while later, this is to help me remember some of my work.
I think I like it that I started today... April FOOLS day.
I'm going to write about horizontal list menus a little while later, this is to help me remember some of my work.
I think I like it that I started today... April FOOLS day.
Subscribe to:
Comments (Atom)