Log in

View Full Version : centering menu



squeekyninja
04-05-2007, 06:58 PM
hi

could anyone give me a little help as to how i could center the menu
here
http://www.squeekyninja.pwp.blueyonder.co.uk/testlayout1.html

here is the source code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Dynamic Drive: CSS Fixed Layout #2.2- (Fixed-Fixed)</title>
<style type="text/css">

body
{
margin: 0;
padding: 0;
line-height: 1.5em;
font-family: veranda;
color: white;
}


#maincontainer{
width: 606px; /*Width of main container*/
margin: 0 auto; /*Center container on page*/
}

#topsection{
background: orange;
height: 120px; /*Height of top section*/
}

#topsection h1{
margin: 50px;
padding-top: 10px;
}

#contentwrapper{
float: left;
width: 100&#37;;
}

#contentcolumn{
margin-right: 303px; /*Set right margin to RightColumnWidth*/
height: 250px;
background: blue;


}

#rightcolumn
{
float: left;
width: 303px; /*Width of right column*/
margin-left: -303px; /*Set left margin to -(RightColumnWidth) */
background: red;
height: 250px;
}

#footer{
clear: left;
width: 100%;
background: purple;
color: #FFF;
text-align: center;
padding: 4px 0;
}

#footer a{
color: white;
}

.innertube{
margin: 10px; /*Margins for inner DIV inside each column (to provide padding)*/
margin-top: 0;
}


.solidblockmenu{
margin: 0;
padding: 0;
float: left;
font: bold 13px Arial;
width: 100%;
border-width: 0px 0;
background: gray url(media/blockdefault.gif) center;
}

.solidblockmenu li{
display: inline;
}

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

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

.solidblockmenu li a:hover, .solidblockmenu li .current{
color: white;
background: green url(media/blockactive.gif) center;
}

</style>


<style type="text/css">
p.iepara{ /*Conditional CSS- For IE (inc IE7), create 1em spacing between menu and paragraph that follows*/
padding-top: 1em;
}
</style>



</head>
<body>
<div id="maincontainer">

<div id="topsection"><div class="innertube"><h1>HEADER IMAGE</h1></div></div>

<ul class="solidblockmenu">
<li><a href="*">home</a></li>
<li><a href="*" class="current">services</a></li>
<li><a href="*">gallery</a></li>
<li><a href="*">about</a></li>
<li><a href="*">contact</a></li>
</ul>

<div id="contentwrapper">
<div id="contentcolumn">
<div class="innertube"> Content Column: 303px <p>LEFT BACKGROUND IMAGE</p></div>
</div>
</div>

<div id="rightcolumn">
<div class="innertube"> Right Column: 303px <p>RIGHT BACKGROUND IMAGE</p></div>

</div>

<div id="footer"><a href="*">copyright stuff</a></div>

</div>
</body>
</html>


thanks for any help anyone may be able to offer

squeeky ninja