為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Buttons in table cells rendered larger than normal

  • 2 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 n8chz

more options

The HTML that's rendering strangely in Firefox is at https://jsfiddle.net/n8chz/wby05a9c/3/

There are buttons in table cells, and tables within table cells, but W3C validator says it's legit HTML.

First uploaded image is what it looks like in Chromium Version 49.0.2623.108 Ubuntu 16.04 (64-bit), second uploaded image is from Firefox 48.0.1. The enlarged buttons on the right side are seen also in Firefox Developer Edition. But not in IceCat 38.3, or Google Chrome, or Midori (a WebKit browser). The enlarged buttons snap down to normal size when clicked. This is on Ubuntu 16.04 with XFCE 4.12.

The HTML that's rendering strangely in Firefox is at https://jsfiddle.net/n8chz/wby05a9c/3/ There are buttons in table cells, and tables within table cells, but W3C validator says it's legit HTML. First uploaded image is what it looks like in Chromium Version 49.0.2623.108 Ubuntu 16.04 (64-bit), second uploaded image is from Firefox 48.0.1. The enlarged buttons on the right side are seen also in Firefox Developer Edition. But not in IceCat 38.3, or Google Chrome, or Midori (a WebKit browser). The enlarged buttons snap down to normal size when clicked. This is on Ubuntu 16.04 with XFCE 4.12.
附加的畫面擷圖

所有回覆 (2)

more options

If I comment out

update("background-color", "yellow");

The "after-styled" buttons load in their default style with a 2.4px border vs. the "inline-styled" buttons with a 1.6px border.

With the script is re-enabled, you can see that Firefox isn't adjusting the overall size and position of the recolored buttons. (Screen shot attached.)

(The odd thing is that the default style sheet has a 2px width border so why would the borders diverge so much? The divergence seems to be different at different zoom levels. Some different kind of logic is being applied that I don't understand.)

Forcing a repaint by zooming in and back out fixes the size of the buttons. I don't know whether there is a way to trigger a repaint as part of your script.

more options

Specifying height and width CSS properties for the buttons makes them of uniform size. I still don't understand why the buttons should be of different height when all unstyled (as they are all the same height in other browsers). Width I can see varying according to content. Note that IceCat, based on a much older version of Firefox, gets it (what I think is) right, so It would seem some change made to Firefox between version 38 and version 48 affects either rendering of buttons inside table cells or tables inside table cells.

由 n8chz 於 修改