Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

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