开发者

Text-decoration being cut off by overflow:hidden in certain browsers?

开发者 https://www.devze.com 2023-04-11 04:30 出处:网络
So I\'m using the OOCSS media module and I\'m putting a link inside of it and the last line of the link is being cut off.

So I'm using the OOCSS media module and I'm putting a link inside of it and the last line of the link is being cut off.

To explain for anyone who doesn't know about the framework, it's simple to explain: imagine an element with overflow: hidden, and a link inside that element. That's ALL.

If I put a link inside of this element with overflow: hidden, the last text-decoration line of the link is cut off thanks to overflow: hidden. Without having to resort to padding & margin (and hopefully floats) is there anyway to compensate 开发者_JAVA技巧for that last line being cut off? Chrome seems to get this right, not sure though.


Actually there was another question very similar to this recently, you can see my answer there: Html anchor height issue with unitless line heights

So I don't think there's a solution to your question, but I wanted to note that while Chrome gets it right for overflow hidden, when you use overflow auto it's actually a problem as you'll see in that post.


try to set the line height on the text

line-height:1.5;
0

精彩评论

暂无评论...
验证码 换一张
取 消