...

View Full Version : Centering links



vinoman2
10-29-2008, 05:07 PM
How do I center the links at the top of my site:
http://www.linuxpcs.net/

in the style menu a:

#menu a {

float: left;

width: 79px;

height: 32px;

display: block;

text-align: center;

text-decoration: none;

color: #ffffff;

font-weight: bold;

font-size: 12px;

text-transform: uppercase;

it shows text-align: center, but it's not centered. How do I correct this?

abduraooft
10-29-2008, 05:38 PM
Try

#menu ul {/*styles.css (line 62)*/
list-style-image:none;
list-style-position:outside;
list-style-type:none;
margin:0pt auto;
width:474px;/* 6x79px */
}
#menu1 {/*styles.css (line 54)*/
background:transparent url(images/menu.gif) no-repeat scroll 0%;
height:55px;
/*padding-left:180px;*/
padding-top:35px;
/*width:702px;*/
}


PS: You could remove either #menu1 or #menu or even both to avoid divitis (http://csscreator.com/?q=divitis). That <ul> itself is enough to provide that display.

vinoman2
10-29-2008, 07:24 PM
I tried to remove one menu and it really messed it up.

What should I change to center the text links?

effpeetee
10-29-2008, 07:49 PM
Try this.


#menu1
{
width: 702px;
height: 55px;
padding-left: 129px; adjust as necessary.
padding-top: 35px;
background: url(images/menu.gif) no-repeat;
}



Frank

vinoman2
10-30-2008, 02:08 PM
Thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum