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

Left Float Difficulty...

  • Hello Chris! Loved your podcast on floats from November 2008.

    I can make columns float right and left; but, I have a problem making a left sidebar when the left sidebar info in the HTML code sits below the main content.

    Suppose we wanted to create a left sidebar to sit beside the main content. If the sidebar info is above the main content info in the HTML code, it floats okay; but, if the left sidebar info is below the main content info in the HTML code, the left sidebar always sits below the main content. As far as "document flow" is concerned, I suppose the sidebar info ought to stay after the main content info in the code.

    Are there any good tricks to make this happen?
  • If it's just a sidebar and main content, just float the main content to the right.
  • Okay, I posted a sample page.

    http://ifaulkner.com/testcolumns/

    I just wonder how to keep the proper order in the HTML markup and also achieve floated columns left and right for the main content area.

    Thank you!