Thread: CSS nav help!
View Single Post
  #1 (permalink)  
Old 24-02-2008, 07:08 PM
miba's Avatar
miba miba is offline
Junior Member
 
Join Date: Feb 2008
Posts: 5
Default CSS nav help!

Hey guys,

I'm trying to make the navigation on my portfolio a bit more interesting, and I've got a CSS one that I like, but I'm having a few problems with it, and was wondering if you could help. I didn't make/write the code for this, I got it from a website, but changed a few things to fit my portfolio.

If you want to have a look at it, my site is miba designs | Michael Baker Online Portfolio. At the moment, the CSS nav in only on the index page, all the other pages have the old style one.

The problems I'm having with it are;
  1. At the moment, the text is aligned to the left, but I want it to be centred, like my old style nav. I've tried using "text-align:left;" in the css, but it doesn't seem to work.
  2. In IE, when you resize the window, the nav doesn't move, until you hover over it...any ideas why? Is there a fix or is this IE being awkward as always?
The CSS is;

Code:
ul.menu {
list-style-type:none;
width:auto;
position:relative;
display:block;
height:35px;
font-size:11px;
background:url(../images/bg.png) repeat-x top left;
font-family:Verdana,Helvetica,Arial,sans-serif;
margin: 0;
padding:0;
}

ul.menu li {
display:block;
float:left;
margin:0;
padding:0;
}

ul.menu li a {
float:left;
color:#ffffff;
text-decoration:none;
height:24px;
padding:9px 15px 0;
}

ul.menu li a:hover,.current {
color:#ffffff;
background:url(../images/bg.png) repeat-x top left;
}

ul.menu .current a {
color:#444444;
}


ul.menu.orange{
background-color:#444444;
}
ul.menu.orange li a:hover, .menu.orange li.current {
background-color:#ffffff;
}
and the HTML is;

Thanks guys,
Michael
Reply With Quote