473,382 Members | 1,247 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Problem with clearing in IE

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
9 1485
"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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jason Callas | last post by:
I have a stored procedure that runs as a step in a scheduled job. For some reason the job does not seem to finish when ran from the job but does fine when run from a window in SQL Query. I know...
18
by: Niels | last post by:
Hi group, I have some problems with clearing floated divs. My usual method works fine in Konqueror, but not in Firefox. Here's an example: <html><body> <div id='left' style='float:left;...
5
by: Chris Beall | last post by:
See http://pages.prodigy.net/chris_beall/BeallSprings/WC.Deed%20GG.116-17.html using the CSS at http://pages.prodigy.net/chris_beall/BeallSprings/BSstyle.css The page is a transcript of a...
2
by: vikas | last post by:
hi, I want to generate random numbers in c++ (using vc++ 6.0) on hit of enter. I am using _kbhit(), but don't know how to reset it, so that I can use it again, can anybody help me with this. code...
11
by: Sagaert Johan | last post by:
I have made a custom control that draws a rectangle when the mouse is down, and does nothing when the mouse is up. I set/reset a flag in MouseDown/Mouse up and use this to do the drawing in the...
5
by: k7 | last post by:
Hi, I have a oc4j application server hosting my application . I can see from tcp monitor for eg: GET /scripts/main.js and the server responds with last-modified timestamp. However for subsequent...
65
by: Leslie Kis-Adam | last post by:
Hi everyone! Does anyone know, if it is possible to clear the screen in ANSI C? If it is,then how? Any help would be appreciated. Laszlo Kis-Adam <dfighter_AT-NOSPAM_freemail.hu
5
by: =?Utf-8?B?U2FpIFZhamph?= | last post by:
Hi I am working on a website and suddenly this afternoon i cannot view anything on my pages. No html is being rendered to the pages (no errors are shown while compiling the website). I have...
13
by: shapper | last post by:
Hello, I have the following code: <div id="outer" class="outer"> <ol> <li>Item outer 01</li> <li>Item outer 02</li> </ol> <div id="inner" class="inner">
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.