Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
IE6+7 adds unintended bottom margin to 1st floated div, others below ok
Old 06-10-2009, 04:13 PM IE6+7 adds unintended bottom margin to 1st floated div, others below ok
seannarae's Avatar
Skilled Talker

Posts: 65
Location: san francisco, ca
Trades: 0
I have a stack of divs that will eventually contain info/content.
Above each is a div floated right
All of this is wrapped in a div for global margins
In FF, all divs are perfectly stacked with no top or bottom margins between
But IE6/7 adds an unintended bottom margin to the 1st floated div. only the 1st.
If i remove the float, the margin goes away.

Here's my CSS + HTML.

Any clue how to resolve this? I've tried so many tweeks & pinches i think i'm in that cant-see-the-forest-for-the-trees phase.

thanks...

CSS
Code:
.contwrap { margin:5px 10px 0px 10px; padding:0px; }
.btn_select { width:150px; margin:0px 10px 0px 0px; background-color:#999999; text-align:center; display:inline; float:right; }
.btn_select a, .btn_select a:hover { color:#FFFFFF; font-weight:bold; text-decoration:none; }
.infoblock { margin:0px 0px 0px 0px; border-top:1px solid #c2c1c0; border-bottom:1px solid #c2c1c0; background:#fcfcec; line-height:1.3em; clear:both; }
HTML
Code:
<div class="contwrap">

    <div class="btn_select"><a href="#">Select This Account</a></div>
    <div class="infoblock">test</div>

    <div class="btn_select"><a href="#">Select This Account</a></div>
    <div class="infoblock">test</div>

    <div class="btn_select"><a href="#">Select This Account</a></div>
    <div class="infoblock">test</div>

</div>
seannarae is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-10-2009, 04:55 PM Re: IE6+7 adds unintended bottom margin to 1st floated div, others below ok
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Have you zeroed out ALL margins and padding for all the elements on your page first, prior to putting them back on for each element as needed ?

How are you clearing your floats ?
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-10-2009, 05:29 PM Re: IE6+7 adds unintended bottom margin to 1st floated div, others below ok
seannarae's Avatar
Skilled Talker

Posts: 65
Location: san francisco, ca
Trades: 0
i'm killing (o, resetting) all margins & paddings with:
Code:
 * { margin:0px; padding:0px }
the items that are floated right (.btn_select) are cleared by the contains directly below each of them (.infoblock) using clear:both;. Or, do i misunderstand your question?
seannarae is offline
Reply With Quote
View Public Profile
 
Old 06-10-2009, 10:51 PM Re: IE6+7 adds unintended bottom margin to 1st floated div, others below ok
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
No, you understood the question
Ok, chalk up another one for the Holly Hack !
If you add height: 1%; on .infoblock, the extra space goes away. However you'll have to do this with conditional comments and a separate css file just for the 'hacks' to make IE behave.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to IE6+7 adds unintended bottom margin to 1st floated div, others below ok
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19211 seconds with 12 queries