Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2005
    Location
    UK
    Posts
    79
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Columns with CSS

    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:
    Code:
    #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!
    Andrew,
    AKA ItsMe

  • #2
    Regular Coder kewlceo's Avatar
    Join Date
    Mar 2006
    Location
    California, US
    Posts
    484
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Here's a link that should help you: http://css.maxdesign.com.au/floatutorial/
    UBERHOST.NET
    Shared, reseller, semidedicated hosting and dedicated server plans.
    DirectAdmin • Installatron • Money-Back Guarantee • 24/7 Support
    Providing "Service Above All Else" since 2005.

  • #3
    New Coder
    Join Date
    Mar 2005
    Location
    UK
    Posts
    79
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That link was very helpful, thanks.
    Andrew,
    AKA ItsMe


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •