Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Buttons in table cells rendered larger than normal

  • 2 trả lời
  • 1 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi 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.
Đính kèm ảnh chụp màn hình

Tất cả các câu trả lời (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.

Được chỉnh sửa bởi n8chz vào