...

View Full Version : Columns with CSS



ItsMe
05-09-2007, 03:35 PM
I have a site written in CSS. Its all in a container called page and then theres a sub-container for the main content of the page called main_page.

I am trying to put 2 columns into this container, but i cannot get them to sit next to each other, instead the top of the right hand column is just below the bottom of the left one.

My code for these two columns is:

#col1 {
width:50%;
margin-top:15px;
background-color:#FFFF00;
}
#col2 {
width:50%;
margin-left:50%;
background-color:#00FF00;
}

Any ideas as to why they are not level with each other?

Thanks!

kewlceo
05-09-2007, 03:41 PM
Here's a link that should help you: http://css.maxdesign.com.au/floatutorial/

ItsMe
05-09-2007, 04:01 PM
That link was very helpful, thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum