This is a discussion on "what is the best way to construct the css floats and width size to my div layout?" within the Web Page Design section. This forum, and the thread "what is the best way to construct the css floats and width size to my div layout? are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
what is the best way to construct the css floats and width size to my div layout?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
what is the best way to construct the css floats and width size to my div layout?
Here is the layout of my Html div
advise me on the best way to code the css floats and the with size of my above divs. Shall I have the main wrapper as 100% width and left and right margins to auto and then float the rest of the div to left or is there any other best way. Thanks for all the replies. Ket |
|
|
|
#2
|
|||
|
|||
|
Re: what is the best way to construct the css floats and width size to my div layout?
Give the main wrapper "margin: 0 auto" and "width: 950px".
Float the right content with "float: right" and "width: 200px" (change the width as you please). Apply "clear: both" to the footer. There are several variations, of course; it all depends on what exactly you wish to achieve. |
|
#3
|
|||
|
|||
|
Re: what is the best way to construct the css floats and width size to my div layout?
Thanks for your reply.. Just one more question, if I set the main wrapper to 950 px and the margins to auto. and within that say I have Content Wrapper that wraps the Main content and a Right Column Content, what floats I would apply to the Content Wrapper, Main Content and Right Column Content.
I will be floating the Main Content to "left" and Right Column Content to "Right" and the main content will 650 px and the right colume to be 300 px. Do I float the content wrapper? and how can I make sure it only wraps the div Main Content and the div Right Column Content. I always seem to mess up my template as I go along, so just want to have a rough design guideline. Thanks.. |
|
#4
|
|||
|
|||
|
Re: what is the best way to construct the css floats and width size to my div layout?
I would just set the width of one of your columns -- the narrower one -- and leave the other one to adjust automatically.
There's no need to float both columns (one left, one right). Just float the narrow one (which has an explicit width). Specifying a width for floats is a Good Idea. Feel free to experiment, however! |
|
#5
|
|||
|
|||
|
Re: what is the best way to construct the css floats and width size to my div layout?
Thanks for your advise, I will be creating my base template in the evening, I will let you know if I have any problems.
Thank, |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Floats... | Bocaj | Starting Out | 1 | May 28th, 2008 23:18 |
| Fixed Width or Liquid Layout? | mwdesign | Web Page Design | 3 | May 10th, 2008 08:46 |
| Floats don't effect the height of the their container????? | chrissp26 | Web Page Design | 5 | Sep 19th, 2007 15:38 |
| Problem with positioning in css and floats etc | Mavin | Web Page Design | 13 | Nov 9th, 2006 13:15 |
| js/css problem-using the width&height values obtained with js to structure my layout | sanchopansa | JavaScript Forum | 0 | Jul 21st, 2006 20:13 |