| View previous topic :: View next topic |
| Author |
Message |
jomanda Enthusiastic Coder
Joined: 19 May 2006 Posts: 70 Location: Germany
|
How can I have two div as though they were <table><tr><td></td><td></td></tr></table> ?
Reply with quote
|
| |
|
|
AmeliaR Enthusiastic Coder
Joined: 31 May 2006 Posts: 142
| |
jomanda Enthusiastic Coder
Joined: 19 May 2006 Posts: 70 Location: Germany
|
yes, that works, but creates a problem... the content that follows the div "table" doesn't follow at the end of the container div
Ie: <div><div style="float: left">content</div><div>content</div></div>
Content that follows that bit isn't below the container div
It's usually directly under 2nd column div
Reply with quote
|
| |
|
|
AmeliaR Enthusiastic Coder
Joined: 31 May 2006 Posts: 142
|
yes, it takes some mastery of css layout techniques. can you easily apply a clear: both; on the element that follows the two floated divs?
Reply with quote
|
| |
|
|
jomanda Enthusiastic Coder
Joined: 19 May 2006 Posts: 70 Location: Germany
| |
AmeliaR Enthusiastic Coder
Joined: 31 May 2006 Posts: 142
| |
jomanda Enthusiastic Coder
Joined: 19 May 2006 Posts: 70 Location: Germany
| |
AmeliaR Enthusiastic Coder
Joined: 31 May 2006 Posts: 142
|
apply these css properties: width: 100%; overflow: auto;
jomanda: the properties will turn the containing div into hasLayout in IE, so it will grow to contain the floats.
Reply with quote
|
| |
|
|
jomanda Enthusiastic Coder
Joined: 19 May 2006 Posts: 70 Location: Germany
| |
AmeliaR Enthusiastic Coder
Joined: 31 May 2006 Posts: 142
|
and in other browsers, the overflow: auto; will make it grow to contain floated element, as per spec.
Reply with quote
|
| |
|
|
| Page 1 of 2 |
Goto page 1, 2 Next |
|