| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: May 2006
Posts: 63
|
Note on three column layout
I have tryed diffrent methods for getting the 3 column layout, my question are these all correct? 1. Make three divs set to float left. 2.Make three divs set to absolute positioning and manualy lay them out. 3.Make three divs one set to float right and another set to float left, while keeping the center adjusted in the middle. I like absolute positioning, because I feel that I have more control, is that the correct way to do it though? Is it good practice takeing a element out of its normal flow, does it discord the markup at all? Last edited by Ytrav4 : 05-06-2006 at 06:21. |
|
|
|
|
|
#2 (permalink) | |
|
Registered User
Join Date: May 2006
Posts: 63
|
Quote:
I think I may have found my own answer, after some reading, I see that it's not highly recomended to design a layout with absolute positioning, becuase of flexabilty. |
|
|
|
|
#6 (permalink) | |
|
fucksocks™
Join Date: Jun 2005
Location: in the boosh
Posts: 1,630
|
Quote:
exactly |
|
|
|
|
#8 (permalink) |
|
senior member
Join Date: Sep 2005
Location: auckland, nz
Posts: 323
|
if your container has a background you may want to include a cleared element to ensure the container stretches to height of the inside floated divs. <div centered container> <div col1> </div col1> <div col2> </div col2> <div col3> </div col3> <div id="footer"></div> </div centered container> #footer { clear:both; } |
|
|
|
#11 (permalink) | |
|
Registered User
Join Date: May 2006
Posts: 63
|
Quote:
I tried it myself and re checked my code, this is what I have...the left, middle, and right are my columns. div.wrapper { position: absolute; left: 38px; top: 45px; opacity: 0.7; width: 631px; height: 378px; } div p { font-family: arial; padding: 12px; font-size: 12px; } div.left { background-color: white; float: left; width: 206px; height: auto; left: 31px; top: 54px; } div.middle { background-color: white; margin-left: 6px; float: left; width: 206px; height: auto; left: 31px; top: 54px; } div.right{ background-color: white; margin-left: 6px; float: left; width: 206px; height: auto; left: 31px; top: 54px; } |
|
|
|
|
#12 (permalink) |
|
For all your goober needs
Join Date: Dec 2004
Location: Coventry, UK
Posts: 1,551
|
add border:0 to left middle and right add margin:0 to left middle and right before your margin-left add padding: 0 to wrapper in wrapper, change pos:abs to relative like i said in my previous post. |
|
|
|
#13 (permalink) | |
|
Registered User
Join Date: May 2006
Posts: 63
|
Quote:
Is that just for IE support? Or just diffrent defults for diffrent browsers. |
|
|
|
|
#15 (permalink) | |
|
fucksocks™
Join Date: Jun 2005
Location: in the boosh
Posts: 1,630
|
Quote:
no. you dont need to float or define the wrapper position. |
|
|
![]() |