View Full Version : How do I float a sidebar inside the main body?
I'm trying to figure out the best way to float a sidebar inside the main body of my page (not the full height of the main body, just a section in the middle). I'm new to CSS, but I'm thinking I could define a style for a sidebar using margins, but then I'm not sure how this would work inside the main body (would they overlap?). I tried to span a regular ol' table, but the main body text wouldn't display beside it.
Thanks in advance!
10-25-2007, 05:52 PM
You'd just want to make sure that the sidebar was inside of the main div, and float it right:
... sidebar stuffs ...
... main stuffs ...
EDIT: If you just want it floating to the right of a specific section of your main text (which as I reread your post might of been what you were asking about) just enclose that section in a div:
.. main stuff ..
.. more main stuff
.. sidebar ..
.. more main stuff ..
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.