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

Unusual IE float drop issue

I have this webpage where I am getting the dreaded float drop bug in
IE. I tried everything in the float drop FAQs online, but nothing can
get it working. I have narrowed down the problem though. For some
reason the left menu is 195px in IE instead of the 175 specified,
meaning that box divs are wider than the div they are contained in so
the right one drops. However, I can't figure out how to make the left
div equal to only 175px in IE. Any help would be greatly appreciated!

The code looks like this (with #contentleft and #contentright both
inside #frame):

#frame {
width:675px;
height:425px;
margin-right:auto;
margin-left:auto;
margin-top:10px;
padding:0px;
text-align:left;
}

#contentleft {
text-align: center;
height: 100%;
width:175px;
padding:0px;
float:left;
background:#fff;
border-color: #999999;
border-style: solid;
border-bottom-width: 10px;
border-top-width: 0px;
border-right-width: 0px;
border-left-width: 0px;
}

#contentright {
width:500px;
padding:0px;
float:left;
background:#eee;
height:100%;
border-color: #999999;
border-style: solid;
border-bottom-width: 10px;
border-top-width: 0px;
border-right-width: 0px;
border-left-width: 0px;
}

Dec 1 '05 #1
7 5529
Els
al********@gmail.com wrote:
I have this webpage where I am getting the dreaded float drop bug in
IE. I tried everything in the float drop FAQs online, but nothing can
get it working. I have narrowed down the problem though. For some
reason the left menu is 195px in IE instead of the 175 specified,
meaning that box divs are wider than the div they are contained in so
the right one drops. However, I can't figure out how to make the left
div equal to only 175px in IE. Any help would be greatly appreciated!

The code looks like this (with #contentleft and #contentright both
inside #frame):


[snip CSS code for 3 elements]

That code in itself causes no problems in IE at all.
Maybe you should post an online example so we can see what you're
missing.

Before you do though, please read this link:
http://www.safalra.com/special/googlegroupsreply/

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Various Artists - Cinema - Sharon Lifshitz
Dec 1 '05 #2
> [snip CSS code for 3 elements]

That code in itself causes no problems in IE at all.
Maybe you should post an online example so we can see what you're
missing.


The webpage in question is http://www.emoticomm.com. It works in FF,
Safari, and Opera, but alas in IE I am getting the float drop. The
stylesheet is located at http://www.emoticomm.com/stylesheet.css. Also,
I know the CSS is a bit sloppy but it should still work as far as I can
tell...

Alex

Dec 1 '05 #3
Els
Alex Krupp wrote:
[snip CSS code for 3 elements]

That code in itself causes no problems in IE at all.
Maybe you should post an online example so we can see what you're
missing.


The webpage in question is http://www.emoticomm.com. It works in FF,
Safari, and Opera, but alas in IE I am getting the float drop. The
stylesheet is located at http://www.emoticomm.com/stylesheet.css. Also,
I know the CSS is a bit sloppy but it should still work as far as I can
tell...


The problem is caused by the margin:10px; in combination with
float:left; on the coloured divs in the #contentleft.
If you want the divs centered, leave out the float:left;.
If you want them to the left, there's no use for margin:10px;.

Also, you can't have your divs nested inside the <a> elements.
<a href="index.html" class="menu"><div id="red">Our Product</div></a>
should be:
<div id="red"><a href="index.html" class="menu">Our Product</a></div>

Last but not least, if you ask a question here saying you narrowed
down the problem, it's best to not leave out the code that is causing
the problem. The code you showed didn't narrow down the problem, it
omitted the problem ;-)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Take That - Do What You Like
Dec 1 '05 #4
Els wrote:
Alex Krupp wrote:

[snip CSS code for 3 elements]

That code in itself causes no problems in IE at all.
Maybe you should post an online example so we can see what you're
missing.


The webpage in question is http://www.emoticomm.com. It works in FF,
Safari, and Opera, but alas in IE I am getting the float drop. The
stylesheet is located at http://www.emoticomm.com/stylesheet.css. Also,
I know the CSS is a bit sloppy but it should still work as far as I can
tell...

The problem is caused by the margin:10px; in combination with
float:left; on the coloured divs in the #contentleft.
If you want the divs centered, leave out the float:left;.
If you want them to the left, there's no use for margin:10px;.

Also, you can't have your divs nested inside the <a> elements.
<a href="index.html" class="menu"><div id="red">Our Product</div></a>
should be:
<div id="red"><a href="index.html" class="menu">Our Product</a></div>

Last but not least, if you ask a question here saying you narrowed
down the problem, it's best to not leave out the code that is causing
the problem. The code you showed didn't narrow down the problem, it
omitted the problem ;-)


I didn't check his CSS, but should work as well if he uses a Strict doctype.
Transitional puts IE6 into Quirks mode.
IE <6 is always in Quirks mode.
*All* new documents should be using Strict.

If he insists on using Transitional, he should apply the Box Model Hack.

He should change to HTML since he's not using XHTML properly.

--
Gus
Dec 1 '05 #5
>
I didn't check his CSS, but should work as well if he uses a Strict doctype.
Transitional puts IE6 into Quirks mode.
IE <6 is always in Quirks mode.
*All* new documents should be using Strict.

If he insists on using Transitional, he should apply the Box Model Hack.

He should change to HTML since he's not using XHTML properly.


Ahh, thanks for the reminder. I forgot that I borrowed parts of the
layout from someone else and didn't realize that I wasn't using strict
since I haven't gotten around to validating yet.

Alex

Dec 1 '05 #6
Gus Richter <gu********@netscape.net> wrote:
Transitional puts IE6 into Quirks mode.


Only if the url is omitted.

--
Spartanicus
Dec 1 '05 #7
Spartanicus wrote:
Gus Richter <gu********@netscape.net> wrote:

Transitional puts IE6 into Quirks mode.

Only if the url is omitted.


Yes that is so.

--
Gus
Dec 1 '05 #8

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

Similar topics

14
by: Glen Able | last post by:
Should it be possible to create a custom class, 'Float', which would behave as a drop-in replacement for the builtin float type? As mentioned in another thread, I once tried this in rather a...
3
by: bofh1234 | last post by:
I am trying to write a function that returns a float. This is what the function should do: It takes the socket number and a variable name. The function looks up the variable in an array of...
5
by: Peter Hansen | last post by:
I'm investigating a puzzling problem involving an attempt to generate a constant containing an (IEEE 754) "infinity" value. (I understand that special float values are a "platform-dependent...
11
by: Christian | last post by:
Hi, I have a small problem about distant compilation and float literals. Here is my program : #include <stdio.h> void main() { float f; double d; f = 0.5;
1
by: impulsenine | last post by:
Hello all. I have yet another IE float drop challenge for you. I am aware that this comes up a lot, and I hope I'm not trying your patience by asking for help with it. The page has 3 columns,...
3
by: paul.denlinger | last post by:
I can't make the drop-cap work on this paragraph, and then get the paragraph to float left to align. Here is the code below; the URL is http://www.china-ready.com/colly/chapter04/text1.htm ...
9
by: mathieu | last post by:
Hi, I know I am doing something stupid here, but it's friday night and I cannot see what is the issue here: Thanks, -Mathieu #include <iostream>
3
by: Arnie | last post by:
Folks, We ran into a pretty significant performance penalty when casting floats. We've identified a code workaround that we wanted to pass along but also was wondering if others had experience...
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: 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
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.