By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,639 Members | 1,988 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,639 IT Pros & Developers. It's quick & easy.

Problem with clearing in IE

P: n/a
Hello,

I'm trying to do a simple three column layout, with two divs (#left and
#right) floating left and right, and the #content-div with margins in
between, and all three in a wrapper-div. The goal is to get equal
height columns (with #content having another background-color than the
two other divs). The two divs on the sides and the wrapper get the same
background-color #222, and the content-div gets #555. All works fine,
as long as the content-div is taller than the two side-columns. For
the case that the content-div is shorter I put a clearing div at the
end, which should pull it down and extend the background-color for the
middle div. At http://www.geocities.com/dvdchazz/layout1.html I have an
example.

In Opera and Firefox all works fine. The problem comes when its viewed
in IE (6.0 and lower). The middle column extends to the left and below
the left #left-div, ruining the layout.

But when the middle column is shorter than both side-columns all is
fine again, as shown in http://www.geocities.com/dvdchazz/layout2.html.

I read about the peek-a-boo bug and all that stuff, and I tried the
Holly Hack and other things. But then the strange behaviour in IE
stops, but the clearing div doesn't get pulled down under the two side
columns but sits just below the content-div, as shown in
http://www.geocities.com/dvdchazz/layout3.html.

I hope someone can give me a hint what's wrong here.

Dec 7 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
"Werner Hempel" <we**@gmx.net> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Hello,

I'm trying to do a simple three column layout, with two divs (#left and
#right) floating left and right, and the #content-div with margins in
between, and all three in a wrapper-div. The goal is to get equal
height columns (with #content having another background-color than the
two other divs). The two divs on the sides and the wrapper get the same
background-color #222, and the content-div gets #555.
With just styling the divs this can be tricky. You can cheat though, by
setting the backround of the container div to an image. A good explanation
of how to do this can be found at:-

http://www.alistapart.com/articles/fauxcolumns/
At http://www.geocities.com/dvdchazz/layout1.html I have an example.


A bit hard to look at the page properly because of the ad bar (at leat in
IE - I can block ads in firefox). Can the ads be turned off? Never mind, I
hope the idea I suggested helps.

Martin

--
Martin Eyles
Dec 8 '05 #2

P: n/a
On Thu, 8 Dec 2005 10:32:19 -0000, "Martin Eyles"
<ma**********@NOSPAM.bytronic.com> wrote:
"Werner Hempel" <we**@gmx.net> wrote in message
news:11**********************@g49g2000cwa.googleg roups.com...
Hello,

I'm trying to do a simple three column layout, with two divs (#left and
#right) floating left and right, and the #content-div with margins in
between, and all three in a wrapper-div. The goal is to get equal
height columns (with #content having another background-color than the
two other divs). The two divs on the sides and the wrapper get the same
background-color #222, and the content-div gets #555.


With just styling the divs this can be tricky. You can cheat though, by
setting the backround of the container div to an image. A good explanation
of how to do this can be found at:-

http://www.alistapart.com/articles/fauxcolumns/


Thanks, I know the faux columns trick. But I want to achieve this
without background images and with as few extra divs as possible. The
only constriction is that with this method the two side divs can't
have different colors.

At http://www.geocities.com/dvdchazz/layout1.html I have an example.


A bit hard to look at the page properly because of the ad bar (at leat in
IE - I can block ads in firefox). Can the ads be turned off? Never mind, I
hope the idea I suggested helps.


Oops, I just forgot they have ads. I put the examples here:
http://zynist.homepage.t-online.de/

Dec 8 '05 #3

P: n/a
Werner Hempel wrote:
Hello,

I'm trying to do a simple three column layout, with two divs (#left and
#right) floating left and right, and the #content-div with margins in
between, and all three in a wrapper-div.

<...>

I saw a really good example of a 3-column layout. IIRC it was on the
"Position is Everything" website - that might help you solve the
problem.

Dec 8 '05 #4

P: n/a
On Thu, 08 Dec 2005 11:03:17 -0800, Tony wrote:
I saw a really good example of a 3-column layout. IIRC it was on the
"Position is Everything" website - that might help you solve the
problem.


http://positioniseverything.net/articles/onetruelayout/

regards,
--
Robert
http://brightonfixedodds.net

Dec 8 '05 #5

P: n/a
Robert Frost-Bridges wrote:
On Thu, 08 Dec 2005 11:03:17 -0800, Tony wrote:
I saw a really good example of a 3-column layout. IIRC it was on the
"Position is Everything" website - that might help you solve the
problem.


http://positioniseverything.net/articles/onetruelayout/


Yep - that was it :)

Dec 8 '05 #6

P: n/a
I saw a really good example of a 3-column layout. IIRC it was on the
"Position is Everything" website - that might help you solve the
problem.


http://positioniseverything.net/articles/onetruelayout/


Thanks for the tip, but that's a very laborious way with a lot of
hacks. My approach seems much simpler to me, and I just wanna know
what's happing and why it doesn't work. I'm not even sure if I will
use this layout, but I'm really interested in finding out if it can
work.
Dec 8 '05 #7

P: n/a
Werner Hempel wrote:
On Thu, 8 Dec 2005 10:32:19 -0000, "Martin Eyles"
<ma**********@NOSPAM.bytronic.com> wrote:

http://www.alistapart.com/articles/fauxcolumns/


Thanks, I know the faux columns trick. But I want to achieve this
without background images and with as few extra divs as possible.


Good luck with that. As it stands now, you're stuck with using kludges
like background images mostly because of IE.

If you didn't have to be concerned with IE, lots of things would be easier.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Dec 9 '05 #8

P: n/a
Robert Frost-Bridges wrote:

http://positioniseverything.net/articles/onetruelayout/


It will be interesting to see what IE7 does with this...

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Dec 9 '05 #9

P: n/a
On Thu, 08 Dec 2005 19:25:29 -0600, kchayka <us****@c-net.us> wrote:
Good luck with that. As it stands now, you're stuck with using kludges
like background images mostly because of IE.

Well, there's still the possibility to use negative margins.
But I thought most of the IE bugs can be somehow fixed. But here I
can't find a way. Either because it's impossible, or it so simple ;)
If you didn't have to be concerned with IE, lots of things would be easier.


Learned that the hard way.

Dec 9 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.