...

View Full Version : Positioning w/ CSS



Saxofoner
12-18-2006, 10:45 PM
I need to put things in 3 columns on a page, trying w/o tables, and for some reason, it always treats it like there's a <br> after each element.


.left {position: relative; left: 200px; }
.right {position: relative; left: 800px; }

.centeredImage

{

background-color: rgb(57,57,57);

text-align:center;

margin-top:0px;

margin-bottom:0px;

padding:0px;

}

That's the CSS, and whenever you use it, the lines get spread out vertically. What'd I do wrong?

kaitco
12-18-2006, 11:25 PM
This should work. You needed to float the columns. There are lots of sources available, like here (http://www.maxdesign.com.au/presentation/page_layouts/).


.left {
position: relative;
float: left;
width: 200px;
}

.right {
position: relative;
float: left;
width: 800px;
}

.centeredImage {
float: left;
background-color: rgb(57,57,57);
text-align: center;
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
}

Saxofoner
12-21-2006, 12:38 AM
Well, thanks. I'm only a fledgling CSS'er and hadn't seen that function yet. Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum