Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Firefox Quantum ignoring a column's top and bottom CSS padding

more options

I am developing a site and when I see it in Firefox Quantum the top and bottom padding of a column is ignored.

I have attached 2 screenshots, comparing Firefox Quantum and Chrome.

Web Developer>Inspect (CTRL+SHIFT+C) shows the correct CSS (padding top and bottom 3%), but only left and right padding (also 3%) are displaying. The top and bottom CSS settings are being ignored.

I am developing a site and when I see it in Firefox Quantum the top and bottom padding of a column is ignored. I have attached 2 screenshots, comparing Firefox Quantum and Chrome. Web Developer>Inspect (CTRL+SHIFT+C) shows the correct CSS (padding top and bottom 3%), but only left and right padding (also 3%) are displaying. The top and bottom CSS settings are being ignored.
已附加屏幕截图

所有回复 (3)

more options

Interesting, have you run the code through W3C.org HTML https://validator.w3.org/ and CSS https://jigsaw.w3.org/css-validator/ and Unicorn https://validator.w3.org/unicorn/ Just to see. I find if follow the W3C standards and practices it will be the same in any browser. If that is the case I would suppose Developer is off somewhat and maybe a bug report needs to be filed.

There are ways to correct that that I do not know if above url's do not help you.

Please let us know if this solved your issue or if need further assistance.

more options

The issue is in Firefox. It does not follow padding-top and padding-bottom in percentages.

I had to change it to pixels.

I originally had: padding: 3% 3% 3% 3%; Firefox only shows the padding on the left and right.

I had to change it to: padding: 30px 30px 30px 30px

The problem is that using pixels instead of percentages I will have to set many media querries to adjust for different screen widths.

more options

Firefox is rather picky about percentage measurements in some contexts. For example, if the height of the parent element is not defined, then a percentage of that height is considered undefined.

But percentage padding-top/padding-bottom should work on block or inline-block elements. Could you check the Computed style to see whether the gray box is display:inline instead of block or inline-block?