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
the IE double padding
Old 02-10-2010, 03:57 PM the IE double padding
alfren's Avatar
Novice Talker

Posts: 11
Name: Alfren Enriquez
Location: Davao City, Philippines
Trades: 0
Hi,

I found a bug in IE (both 6 and 7 has the same bug), the padding is doubled.

the page is here: http://alfren24.uni.cc/others/bug.html

here's my css code:

Code:
#right-area {
    width:251px;
    float:right;
    top:-20px;
    position:relative;
}

.rounded-box-right .bg-top {
    background:url(images/right-box_bgtop.jpg) no-repeat;
    width:251px;
    height:10px;
    overflow:hidden;
}

.rounded-box-right .bg-middle {
    background:url(images/right-box_bgmiddle.jpg) repeat-y;
    width:251px;
    overflow:hidden;
    padding:10px 0 10px 0;
}


.rounded-box-right .bg-bottom {
    background:url(images/right-box_bgbottom.jpg) no-repeat;
    width:251px;
    height:10px;
    overflow:hidden;
}

#right-area .box {
    background:url(images/border-hori.jpg) repeat-x bottom;
    padding-bottom:20px;
    width:207px;
    margin:0 auto 10px auto;
}


#right-area .box .link a {
    background:url(images/button_read-more-black.gif) no-repeat;
    width:92px;
    height:25px;
    text-indent:-999em;
    overflow:hidden;
    float:right;
}


and my HTML code:

Code:
<div class="rounded-box-right">
      
        <div class="bg-top">&nbsp;</div>
        
        <div class="bg-middle">
        
          <div class="box">
        
            <h3>title</h3>
          
            <p>Lorem ipsum de amet dolor sit libero neque ut Aenean ligula dolor.</p>
          
            <div class="link">
          
              <a href="#">Read More</a>
          
            </div>
          
            <div class="clr"></div>
          
          </div><!--box end-->
        
        
        </div>
        
        <div class="bg-bottom">&nbsp;</div>
      
      
      </div><!--rounded-box-right-->
noticed the second box in the right side. the padding at the bottom is doubled in IE (bot 6 and 7).

although i can fix this using the IE css hack, i really want to know the cause of this problem.

if anyone knows or experienced this and if anyone know the fix for this one, I would appreciate it.

thanks!
__________________
yo!
alfren is offline
Reply With Quote
View Public Profile Visit alfren's homepage!
 
 
Register now for full access!
Old 02-10-2010, 04:37 PM Re: the IE double padding
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Add
Code:
       display:inline-block;
To the offending element

Use a conditional comment to avoid other "side effects" in standards compliant browsers
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-10-2010, 05:34 PM Re: the IE double padding
alfren's Avatar
Novice Talker

Posts: 11
Name: Alfren Enriquez
Location: Davao City, Philippines
Trades: 0
Well I have already tried it and it doesn't work, that was the first thing i found when searching in google.

and by the way, the padding will only doubled if i add "float:right" on this one: "#right-area .box .link a", if i removed the float, the padding is not doubled. Although i can fix this by changing my css code, I just want to know why is the padding doubled in IE and if there's a fix for this it will be a appreciated.
__________________
yo!
alfren is offline
Reply With Quote
View Public Profile Visit alfren's homepage!
 
Old 02-10-2010, 05:40 PM Re: the IE double padding
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Aha It's NOT the padding in that case.

It's the margin that is doubled
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-10-2010, 09:43 PM Re: the IE double padding
alfren's Avatar
Novice Talker

Posts: 11
Name: Alfren Enriquez
Location: Davao City, Philippines
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Aha It's NOT the padding in that case.

It's the margin that is doubled

Nope its not the margin, i already know about that bug. it will only happen if my float div has a margin direction left or right. if you look at my css, there's no margin in the floated div.
__________________
yo!
alfren is offline
Reply With Quote
View Public Profile Visit alfren's homepage!
 
Old 02-11-2010, 04:26 AM Re: the IE double padding
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
there is no padding on the element either. And it is NOT a div you are referring to, it is a block display anchor element, and there is a -999 em text indent applied which would create some strange effects. I don't have IE6 or 7 on the machine I'm using so I may not actually see the problem you are experiencing.

IETester shows no difference at all between versions (apart from 5.5 of course) and it looks the same as it does in FF and Chrome.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-14-2010, 02:59 PM Re: the IE double padding
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
i really want to know the cause of this problem
the cause - is MICROSOFT!!!!
__________________
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 the IE double padding
 

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.37100 seconds with 12 queries