Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 04-03-2009, 02:07 PM   #1
New Member
 
Join Date: Apr 2009
Posts: 3
Question Floating div in IE6

Here's the problem I'm having:
I made a floating div using relative position and it works fine on IE7. When I try it on IE6, although it floats like it should, it still "occupies" the space it would, if it wasn't floating. I think I made it a little confusing, so imagine this:

HTML Code:
<div id="mainDiv">
bla bla bla

<div id="floatingDiv">I'm floating</div>
</div>
Let's say the floating div has a height of 100px. The problem in IE6 is that, when I make the floating div visible, the mainDiv grows 100px as if the floating div was occupying that space, even though it is floating.
Oh, it's also worth noting that I'm using MultipleIE so it would also be nice if someone can confirm if this is a problem that happens in the real IE6. And if it is really a problem, is there a solution.
Of course, I can always use absolute positioning instead of relative, but I wan to avoid that, since it changes according to the window size.

Here's the CSS of the floating div:

#floatingDiv
{
width: 350px;
height: 30px;
position: relative;
top: -450px;
left: 170px;
z-index:30;
border: solid 2px #000;
}
Chocobo_Master is offline   Reply With Quote


Old 04-03-2009, 02:16 PM   #2
Silver Member
 
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 108
Default

IE6 interperts CSS like a donkey on speed.

Have you tried tried it in Mozilla?
__________________
Nerdrage
Mezangath Web
mezangath is offline   Reply With Quote
Old 04-03-2009, 02:53 PM   #3
New Member
 
Join Date: Apr 2009
Posts: 3
Default

no, haven't tried on Mozilla yet...
Is this to be expected from IE6 then? Isn't there a way to get around this?
Chocobo_Master is offline   Reply With Quote
Old 04-03-2009, 04:45 PM   #4
New Member
 
Join Date: Apr 2009
Posts: 3
Default

Found a solution!
If I use "overflow:hidden" on the mainDiv, its height remains unchanged.
Thanks!
Chocobo_Master is offline   Reply With Quote
Reply

Tags
css, floating div, ie6

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:26 AM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.