Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 01-27-2010, 01:04 AM   #1
Advanced Warrior
War Room Member
 
Join Date: Feb 2008
Location: Chicago, IL
Posts: 660
Thanks: 10
Thanked 17 Times in 9 Posts
Default Help with float/absolute divs in ie6

I've got a very simple landing page that does not display properly in IE6. The "absolute div" is pushed to the right of the "center div" when it shouldn't be. If I remove the floats, the absolute div displays fine, but I'm using "float left" to align the 3 divs right next to each other.

Everything looks fine in FF, IE8, Safari, etc. Just can't get older versions of IE to work.

Can anyone good with CSS help me figure out how to fix this?

Thanks!

Code:
<style type="text/css">
<!--
body {
    background-color: #372d2b;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
#container {
    width: 800px;
    margin-right: auto;
    margin-left: auto;
    height: 550px;
    padding: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
}
#button {
    position: absolute;
    padding-top: 295px;
    height: 119px;
    width: 418px;
    padding-left: 75px;
}
#left {
    float: left;
}
#center {
    float: left;
}
#right {
    height: 416px;
    }
-->
</style>
</head>

<body>
<div id="container">
<div id="button"><a href="go.php"><img src="images/button.jpg" width="418" height="119" border="0" /></a></div>
<div id="left"><img src="images/left_panel.jpg" width="199" height="416" /></div>
<div id="center"><img src="images/center_panel.jpg" width="302" height="416" /></div>
<div id="right"><img src="images/right_panel.jpg" width="299" height="416" /></div>
</div>
</body>


Ryan_Taylor is offline   Reply With Quote
Old 01-27-2010, 01:53 AM   #2
Senior Warrior Member
War Room Member
 
mywebwork's Avatar
 
Join Date: Sep 2008
Location: Honolulu, Hawaii, USA & Montreal Canada
Posts: 2,218
Blog Entries: 1
Thanks: 759
Thanked 724 Times in 505 Posts
Default Re: Help with float/absolute divs in ie6

I feel your pain Ryan, the "Floating DIV" bug with IE6 is well-documented and is one of the two major pains in supporting IE6 (the other one being the lack of support for transparent PNG files, or at least 24-bit ones).

These links may either help or confuse the situation:

IE Float model and the reality | CSS Class

Internet Explorer Float/Margin Bugs

Good luck with it!

Bill
mywebwork is offline   Reply With Quote
Old 01-27-2010, 09:01 AM   #3
Advanced Warrior
War Room Member
 
Join Date: Feb 2008
Location: Chicago, IL
Posts: 660
Thanks: 10
Thanked 17 Times in 9 Posts
Default Re: Help with float/absolute divs in ie6

Excellent - this was helpful. Thanks for the links!


Ryan_Taylor is offline   Reply With Quote
Old 01-27-2010, 09:30 AM   #4
Laurence Samuels
War Room Member
 
Join Date: Oct 2009
Location: Orlando, FL - USA
Posts: 357
Thanks: 63
Thanked 44 Times in 41 Posts
Contact Info
Send a message via AIM to Orlando Web Design Send a message via MSN to Orlando Web Design Send a message via Yahoo to Orlando Web Design Send a message via Skype™ to Orlando Web Design
Default Re: Help with float/absolute divs in ie6

great articles, thanks for posting.

Orlando Web Design: This 'aint your typical web co.
Tax Deed Foreclosures : Build $1 million of real estate wealth. I will show you how
Relationship Stories: Avoid the Altar.com-A million reasons to avoid marriage
Snowshoe Rentals - acne wash - acnefree
Orlando Web Design is offline   Reply With Quote
Old 01-27-2010, 05:52 PM   #5
Scott Blanchard
War Room Member
 
clickbump's Avatar
 
Join Date: Jul 2009
Location: Birmingham, AL
Posts: 803
Blog Entries: 1
Thanks: 122
Thanked 220 Times in 103 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Default Re: Help with float/absolute divs in ie6

Have you tried specifying a doctype to force the browser out of quirks mode? If not, add this to the top of your template?
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

*********WARRIOR SPECIALS************

CLICKBUMP SEO! >>> $17 (regular price $37)
CLICKBUMP5 THEME FRAMEWORK + JUMPSTART PRO! >>> $27 (regular price $47)

Example sites: Local Biz | Review Site | Adsense Site | Silo'd Authority
clickbump is online now   Reply With Quote
Old 01-28-2010, 06:59 AM   #6
Warrior Member
 
Join Date: Jan 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Help with float/absolute divs in ie6

Have you tried to use your code in 800x600? try to include body width:100%. I'm not sure if it will work though

stevepaul25 is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design

Tags
divs, float or absolute, ie6

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 05:47 PM.