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

CSS to change background color of Find bar

  • 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 Quisquose

more options

1. What CSS code do I need in order to change the background color of Firefox's "Find" bar?

2. Will changing the background color of the Find bar also affect the Quick Find (i.e. FAYT) bar, or does that require separate code?

I use the Status-4-Evar extension, and the following code changes its color:

  1. status4evar-status-bar {

-moz-appearance: none !important; background-color: #C8D7F1 !important; }

It works great, and so I wanted to also be able to do the same for the Find bar.

I've tried to find the ID of the Findbar so that I could insert the ID into the above CSS example, but I have been unable to locate the correct ID that I should use.

(Firefox v29)
1. What CSS code do I need in order to change the background color of Firefox's "Find" bar? 2. Will changing the background color of the Find bar also affect the Quick Find (i.e. FAYT) bar, or does that require separate code? I use the Status-4-Evar extension, and the following code changes its color: #status4evar-status-bar { -moz-appearance: none !important; background-color: #C8D7F1 !important; } It works great, and so I wanted to also be able to do the same for the Find bar. I've tried to find the ID of the Findbar so that I could insert the ID into the above CSS example, but I have been unable to locate the correct ID that I should use. (Firefox v29)

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

Use the following in either Stylish or userChrome.css. In the latter, the first line should appear only once in the file. It affects both the Find Bar and the Quick Find Bar.


@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

findbar {-moz-appearance: none !important; background-color: #C8D7F1 !important; }

If you need to examine elements of the user interface, install DOM Inspector and Element Inspector. You can then simply hold down Shift and right-click an UI element. N.B.: this shortcut is used to bring up the default context menu on sites that replace it or prevent it from showing; best to keep Element Inspector disabled when you're not using it.

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

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

more options

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

Use the following in either Stylish or userChrome.css. In the latter, the first line should appear only once in the file. It affects both the Find Bar and the Quick Find Bar.


@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

findbar {-moz-appearance: none !important; background-color: #C8D7F1 !important; }

If you need to examine elements of the user interface, install DOM Inspector and Element Inspector. You can then simply hold down Shift and right-click an UI element. N.B.: this shortcut is used to bring up the default context menu on sites that replace it or prevent it from showing; best to keep Element Inspector disabled when you're not using it.

more options

Thanks. That works great.

I had tried to use DOM Inspector but I found it really confusing and unintuitive. However, your suggestion of using Element Inspector makes it a whole lot easier.