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".

Learn More

Text Out of alignment (with GaugeMeter.js)

  • 8 trả lời
  • 1 gặp vấn đề này
  • 12 lượt xem
  • Trả lời mới nhất được viết bởi yongseong.liew

more options

I have a website that uses GaugeMeter.js component. The text of the gauges are out of alignment (as shown in the screenshot) -- which never the case when it is opened with Chrome Browser (i.e. always centered and within the circle/arc).

Strangely, sometime it works well when I started to change the Firefox window width (it is a responsive page).

Anyone came across this? Any idea to solve this?

I have a website that uses GaugeMeter.js component. The text of the gauges are out of alignment (as shown in the screenshot) -- which never the case when it is opened with Chrome Browser (i.e. always centered and within the circle/arc). Strangely, sometime it works well when I started to change the Firefox window width (it is a responsive page). Anyone came across this? Any idea to solve this?
Đính kèm ảnh chụp màn hình

Giải pháp được chọn

The problem appears to be caused by this rule:

.GaugeMeter {
  display: inline;
}


Why is that needed? You could try using inline-block or using the default (block).

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (8)

more options

Check your zoom controls.

<Control> (Mac=<Command>) + (plus) enlarge - (minus) reduce 0 (zero) restore

more options

Can you post a link to a publicly accessible page (i.e. no authentication or signing on required)?

more options

yongseong.liew said

Strangely, sometime it works well when I started to change the Firefox window width (it is a responsive page).

Probably you have an event handler tied to the resize event. If you call that handler after page load, does that have any effect on the problem?

more options

cor-el said

Can you post a link to a publicly accessible page (i.e. no authentication or signing on required)?

Zipped an offline version which the static page shows the same "out of alignment" issue when viewed in Firefox.

Download link: [https://demo-site.signoff.live/firefo.../firefox-rendering-issue.zip]

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

more options

cor-el said

Can you post a link to a publicly accessible page (i.e. no authentication or signing on required)?

Zipped an offline copy and the static page shows the same issue when viewed offline using Firefox.

Download link: https://demo-site.signoff.live/firefox-rendering-issue.zip

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

more options

cor-el said

Can you post a link to a publicly accessible page (i.e. no authentication or signing on required)?

Zipped an offline copy and the static page shows the same issue when viewed offline using Firefox.

Download link: https://demo-site.signoff.live/firefox-rendering-issue.zip

more options

Giải pháp được chọn

The problem appears to be caused by this rule:

.GaugeMeter {
  display: inline;
}


Why is that needed? You could try using inline-block or using the default (block).

more options

jscher2000 said

The problem appears to be caused by this rule: .GaugeMeter { display: inline; }
Why is that needed? You could try using inline-block or using the default (block).

It comes as the default CSS from the GaugeMeter.js library sample.

Indeed, removing that solves the problem.

It is interesting that Chrome/Safari (Webkit) treats that line differently and never show similar behavior.