View Full Version : My CSS columns wont align properly


chaser7016
11-18-2006, 12:36 AM
As of now at www.ryanspahn.net my column is hugging the right side(if u view in FireFox...IE totally another story). I want the column to move to the center..not of the page but just for it to center. When I mess div.box properties I am able to move it to where I want, but then the mainbox moves downward. Any ideas how to keep the mainbox in the same place and have the column move n the center?


My CSS:
body {
background-color: #191970;
background-image: url(../images/topleft.jpg);
background-position: top left;
background-repeat: no-repeat;

}

div.mainbox {
margin-left: 275px;
margin-top: 10px;
background-color: #FFF8DC;
border: solid 3px #000000;
width: 700px;
height: 480px;
}

div.box{
position: absolute;
float: left;
width: 125px;
height: 480px;
border: solid 3px #000000;
background-color: #FFF8DC;
word-wrap: break-word;
}



div.header {
width: 680px;
height: 0px;
}


p.header {
font-size: 30px;
font-weight: bold;
font-family: verdana;
color: #CD853F;
}


Thanks, Chaser

douglasMAH
11-18-2006, 03:59 PM
Have you tried putting it into a container? Here is a good tutorial that you might want to look at:

http://tutorialtastic.co.uk/page/the_centering_cheat