Log in

View Full Version : Trying to centre align css navigation



gd0g
11-09-2010, 07:36 AM
I obtained this code from Dynamic Drive some time ago and I am trying to centre align the navigation menu rather than have it align to the left.


.solidblockmenu li{
display: inline;

}

.solidblockmenu li a{
float: left;
color: white;
padding: 5px 7px;
text-decoration: none;
border-right: 1px solid white;
}

.solidblockmenu li a:visited{
color: white;
}

.solidblockmenu li a:hover, .solidblockmenu li .current{
color: white;
background: transparent url(blockactive.gif) center center repeat-x;
}

.solidblockmenu{
margin: 0;
padding: 0;
float: left;
font: bold 11px Trebuchet MS;
width: 100%;
background: black url(blockdefault.gif) center center repeat-x;
list-style: none;


I would appreciate any assistance to update this code to achieve this.

Thanks in advance.

Gavin

dustywb
11-10-2010, 01:48 AM
Post the html code as well and I could probably help you out. Also a couple quick questions:
Do you want the entire page to be filled or are you doing a static width? If you're doing a static width you could probably change the .solidblockmenu{ to this

.solidblockmenu{
margin: 0 auto;
////
width: 80%; or some other value in px or whatever
}

anyways hope this helps

syn1st3rx
12-04-2010, 04:19 PM
i agree with dustywb,

post the html so we get a total idea. cos frankly i'm a little confused as to the question.

:?