The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Centering Re: Centering


Thats not do anything either. Here is the and screen shot…way stripped down:

body{ text-align: center; font: 62.5%; font-family: Georgia, “Times New Roman”, Times, serif; padding: 0;}
.wrapper{text-align: left; width: 800px; margin: 0 auto;}

.nav{padding-top: 10px;}
.nav li{display: inline;}
.nav li a{display: block; width: 80px; height: 80px; float: left; text-indent:-9999px; padding-left:10px;}
.nav a{background: url(images/drive.jpg) bottom center no-repeat;}
.nav a:hover{background-position: center center;}

Okay, with that the page is center on the page, but the menu bar still stays to the left, I want it to be directly centered in the middle of the screen. I have to use the float: left tag so that it stays displayed inline. And even if I add the < center > tags above a below the ul code is does nothing. Plus as you can see in the mock up above I’m wanting the greay and red bar to have a width of 100% of the page with the content still centered in the middle.

I’m really at a lost here I have no idea what is going on. Does this make the problem any clearer?