center css
Posted: 07 November 2008 07:40 AM   [ Ignore ]
Newbie
Rank
Total Posts:  2
Joined  2008-11-07

How would I center the following code?

<style type="text/css">

.
indentmenu{
font
bold 13px Arial;
width100%; /*leave this value as is in most cases*/
overflowhidden;
}

.indentmenu ul{
margin
0;
padding0;
floatleft;
width80%; /*width of menu*/
border1px solid #564c66; /*dark purple border*/
border-width1px 0;
backgroundblack url(media/indentbg.gifcenter center repeat-x;
}

.indentmenu ul li{
display
inline;
}

.indentmenu ul li a{
float
left;
colorwhite/*text color*/
padding5px 11px;
text-decorationnone;
border-right1px solid #564c66; /*dark purple divider between menu items*/
}

.indentmenu ul li a:visited{
color
white;
}

.indentmenu ul li a:hover, .indentmenu ul li .current{
color
white !important/*text color of selected and active item*/
padding-top6px/*shift text down 1px for selected and active item*/
padding-bottom4px/*shift text down 1px for selected and active item*/
backgroundblack url(media/indentbg2.gifcenter center repeat-x;
}

</style>

<
div class="indentmenu">
<
ul>
<
li><a href="http://www.dynamicdrive.com/" class="current">Home</a></li>
<
li><a href="">Audio</a></li>
<
li><a href="">Video</a></li>
<
li><a href="">Gallery</a></li>
</
ul>
</
div

I have tried everything I can think of. Then again, I know nothing of SS coding.

Profile
 
 
Posted: 10 November 2008 02:34 PM   [ Ignore ]   [ # 1 ]
Member
Avatar
RankRankRank
Total Posts:  52
Joined  2007-11-08

If you wish to center your list of links, remove the float:left; from .indentmenu ul li a and add text-align:center; on the .indentmenu ul

Profile
 
 
Posted: 10 November 2008 09:51 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  2
Joined  2008-11-07

Thanks, but I figured it out. I should have made a post. The width of my menu was set at 80%. I needed it at 100%.

Profile