CSS文本填充区别Firefox与Chrome和其他 [英] CSS text padding difference Firefox vs Chrome and others

查看:112
本文介绍了CSS文本填充区别Firefox与Chrome和其他的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果有人可以帮助下面的人会感谢这一点,因为我花了整个晚上没有结果这个问题。

if someone could help on the following would appreciate this as I spent the whole evening without result on this issue.

我有一个网站,我想修改标签外观后每篇文章。
问题是firefox(版本14.0.1)为文本提供了更小的高度(总< a>高度为15px icnluding 1px底部填充),而chrome和其余浏览器给高度19px。所以差别是4px。因此 - 标签孔显示在不同的级别。

I have a site where I want to modify tags appearance after every article. The problem is that firefox (version 14.0.1) provides smaller height for the text (total <a> height is 15px icnluding 1px bottom padding), while chrome and rest browsers give height 19px. So the difference is 4px. Because of this - the "tag hole" is displayed at different levels. A little bit lower than vertical middle for FF and upper than middle for rest browsers.

我制作了一张照片,让问题变得更容易:

I made a picture to get the problem easier:

我有一般的css重置,浏览器的行为类似。但它看起来不是一切都包括在那里。
有人知道可能会导致这种情况吗?

I have general css reset, so that different browsers behave similar. But it looks like not everything is included there. Has anyone an idea what could cause this?

推荐答案

添加 display:inline-block ; 到您的 .tags li a

行为浏览器,但会修复FF

This won't affect the well-behaving browsers, but will fix FF

这篇关于CSS文本填充区别Firefox与Chrome和其他的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆