[Solved] floating content correctly

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
TJINAK
Forum Members
Forum Members
Posts: 136
Joined: Wed Feb 22, 2006 1:01 am

[Solved] floating content correctly

Post by TJINAK »

Hello,

Can someone kindly point out how I might get my content to line up correctly?

http://www.careyhart.net/index.php?page=08-8446


Thank you,

TJ
Last edited by Anonymous on Mon Jul 21, 2008 9:43 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: floating content correctly

Post by Dr.CSS »

#menu_vert {float:left;
christiaans
Power Poster
Power Poster
Posts: 300
Joined: Tue Mar 04, 2008 10:37 am

Re: floating content correctly

Post by christiaans »

As mark already stated, floating objects properly is the key.

use float: left; for the div sidebar
and float: right; for the div main (rather then adding "", keeps it much cleaner and easier to work with imho!)

and a thing I always do, is in the next div after (or in this case below the sidebar and the menu), add clear: both; or even better, the clearfix hack (Google for it, you'll find it).
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: floating content correctly

Post by Dr.CSS »

They are using a default template but when the menu was put in the side bar it naturally goes full width until you tell it to float then it will clear the right side for the content, you don't have to float the sidebar or the content...
christiaans
Power Poster
Power Poster
Posts: 300
Joined: Tue Mar 04, 2008 10:37 am

Re: floating content correctly

Post by christiaans »

mark wrote: They are using a default template but when the menu was put in the side bar it naturally goes full width until you tell it to float then it will clear the right side for the content, you don't have to float the sidebar or the content...
Very true indeed. My bad.
christiaans
Power Poster
Power Poster
Posts: 300
Joined: Tue Mar 04, 2008 10:37 am

Re: floating content correctly

Post by christiaans »

Topic closed, problem is solved.
Locked

Return to “Layout and Design (CSS & HTML)”