IE7 is clipping my text. How do I adjust its attitude?

前端 未结 10 672
小蘑菇
小蘑菇 2021-02-07 07:39

A few days ago I re-skinned my website. Development of this skin was primarily done using safari, and as expected, it all renders fine using firefox and opera. I\'ve had to make

相关标签:
10条回答
  • 2021-02-07 07:47

    Adding a specific height to .title fixes it for me (in IE6):

    .title {
        PADDING: 0 10px 0 0; MARGIN-top: 0.3em; FLOAT: right; height: 1em;
    
    0 讨论(0)
  • 2021-02-07 07:48

    Try adding overflow: visible; to your .postdate class. Maybe that helps.

    0 讨论(0)
  • 2021-02-07 07:48

    I had a similar problem. I changed my span to a div and the problem was resolved. I think IE7 might have an issue processing line-height on a span. Haven't confirmed that to be the issue. There were other CSS elements. (Working on someone else's code.) But changing from span to div (block) resolved the issue.

    0 讨论(0)
  • 2021-02-07 07:48

    In my experience its invariably the bottom of the text that gets clipped and that too basically because of the overlapping divisions. If you are able to ensure that the divs don't overlap then the issue does get resolved . That apart adding overflow: visible does help at times.

    0 讨论(0)
  • 2021-02-07 07:48

    I think the problem is with the padding. I tried removing a "padding: 3px" style and it worked properly. Previously it was not showing anything. Paul Hart's answer showed me that.
    Probably also removing/overriding margin properties may also help.

    0 讨论(0)
  • 2021-02-07 07:50

    There's a hack I figured out that fixes the problem of cutting off text in IE. I noticed the last line in my headline was the only one being cut off.

    My original CSS which was cutting off the last line in IE7 but looked fine in other browsers:

    h2 {
       font-size: 22px;
       line-height: 1em;
    }
    

    See image of problem here: https://skitch.com/pablohart/f4g3i/windows-7-x64

    The fix I did included simply adding padding to the bottom and then taking that padding back with negative margin. Like this:

    h2 {
       font-size: 22px;
       line-height: 1em;
       padding-bottom: 5px;
       margin-bottom: -5px;
    }
    

    See picture of fix in this image: https://skitch.com/pablohart/f4g4h/windows-7-x64

    The problem with line-height: normal; is that it takes on the default line-height for the font, usually 1.3em.

    0 讨论(0)
提交回复
热议问题