treehouse : what would you like to learn today?
Web Design Web Development iOS Development

CSS Layouts 2 columns

  • I have been having this question in my head for weeks and I just wanted to know what everybody else does is.

    Lets say we have a two column layout.. a sidebar and a main content. the sidebar will be 200px and the main content will be 500px.

    To be short the question is that I have seen several solutions and would want to know whats the recommended.

    1. Would be to float both to the left, and main content to have a margin of 200px.
    2. Would be to float the sidebar to the left and just have a margin for the main content of 200px.
    3. As Andy Budd describes it is to float the sidebar to the left and the main content to the right, wrapped in a in a container.

    Please let me know what the best practice is, I have seen so many different ways and it just drives me nuts..

    Thanks,

    David
  • I would float one to the left and one to the right. It makes the most logical sense, and therefor is my choice.
  • no 3 is what i always do