473,326 Members | 2,095 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,326 software developers and data experts.

MSIE 6 Basic Float Problem

Aloha,

I'm having a problem with floated divs in msie 6. I've created a demo page
that illustrates the problem. (http://kvb.tsu.biz/test.html). On that page
is a div wrapper with a green background. Inside the wrapper are two other
divs one floated left (yellow) and the other one (red) should line up on the
same line because there is a margin that leaves room for the floated left
div. This works as expected in every Mac browser I have but in windows, msie
6 positions the red box under and to the left of the yellow box. This seems
so basic I don't understand what the problem is unless it's a bug but I
couldn't find any reference to it any where.

Thanks,
Gary

Jul 21 '05 #1
3 1574
RAM
Hi Gary,

The problem is in the way IE Calculates the widths:
Just modify the #page width to 747px (instead of 745px) and IE displays
the colored blocks correctly.
This is not a solution, but just a small workaround

Jul 21 '05 #2
On Wed, 15 Dec 2004, RAM blurted out without context:
The problem is in the way IE Calculates the widths:
No, the *problem* is with trying to fix web page design in px units.
Just modify the #page width to 747px (instead of 745px) and IE displays
the colored blocks correctly.
Better to stop trying to do this at all.
This is not a solution, but just a small workaround


Right. So why not go for the solution, instead of storing up
the same problem for later?

Jul 21 '05 #3

"Gary Smith" <gt*@tsu.biz> wrote in message
news:BDE50902.3661D%gt*@tsu.biz...
Aloha,

I'm having a problem with floated divs in msie 6. I've created a demo page
that illustrates the problem. (http://kvb.tsu.biz/test.html). On that page
is a div wrapper with a green background. Inside the wrapper are two other
divs one floated left (yellow) and the other one (red) should line up on the same line because there is a margin that leaves room for the floated left
div. This works as expected in every Mac browser I have but in windows, msie 6 positions the red box under and to the left of the yellow box. This seems so basic I don't understand what the problem is unless it's a bug but I
couldn't find any reference to it any where.

Thanks,
Gary


IE also likes height defined.
Even if #page is something like 100%.
Total your width elements. Do they equal the #page width?
IE likes inner elements a tad smaller.

Quite frankly, the use of px for setting the stage will result in variances
depending on browser resolution and size.
Use mm and it will look the same regardles.

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: drowned | last post by:
I'm having a problem understanding why the code in this little program I've got is behaving the way it does... if anyone can explain it, I'd be grateful: #include <iostream> using namespace...
3
by: Christoffer Berg | last post by:
Hi Please see http://217.209.105.84/float.html for two problems with floated divs in MSIE. Problem 1: the text next to the floated div gets indented even though there is enough left margin in...
1
by: Christoffer Berg | last post by:
Hi Now I've run into another issue with floats in MSIE. The problem is that under some circumstances (see problem 3 on my test page below) floating a block effects the padding of a following...
17
by: Brian | last post by:
Shame on me for not testing my site http://www.tsmchughs.com/ in MSIE at "larger" font size. I just did today, and found an unpleasant result. The content gets pushed behind the navigation, which...
5
by: Carol Wang | last post by:
I'm having an issue with MSIE 5.2 on the Mac. The width of my text based logo box expands to most of the page and an absolutely positioned item is nowhere near where it should be. ...
7
by: Ike | last post by:
Anyone have any idea why the following would work on Netscape 7.x but not MSIE ? Thanks, Ike <input type=button onClick="recalc()" value="Recalc Form"> .. .. .. <SCRIPT...
3
by: Alan Searle | last post by:
I am building the following web site ... http://www.alse.com/OSD3/ .... (still under construction) with everything displaying more or less OK for me under Firefox and MSIE 6.0 However, one...
0
by: quinto1000 | last post by:
Hello to all, I have a problem that I cannot solve, I have a file in C++ and like not like translating it to visual BASIC, I write to them to be able to receive aid and that somebody helps me to...
9
by: jollyrabbit | last post by:
hi, i'm new to all this css stuff. just did a small very simple site for a friend and in msie5, 5.5 and 6 the right float (another div) within the container slips down to below the left float....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.