Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Mozilla Destek’te Ara

Destek dolandırıcılığından kaçının. Mozilla sizden asla bir telefon numarasını aramanızı, mesaj göndermenizi veya kişisel bilgilerinizi paylaşmanızı istemez. Şüpheli durumları “Kötüye kullanım bildir” seçeneğini kullanarak bildirebilirsiniz.

Learn More

Hide placeholder text only in certain text boxes

  • 2 yanıt
  • 1 kişi bu sorunu yaşıyor
  • 1 gösterim
  • Son yanıtı yazan: Quisquose

more options

I would like to hide placeholder text in the URL Address bar and Search bar ONLY, and nowhere else.

I found the some CSS code that works, but it hides placeholder text in ALL text boxes, not just the URL and Web Search boxes.

How should I modify the code below to restrict it so that other textboxes (such as the Quick Find / FAYT) remains unaffected?

  • |*.textbox-input::-moz-placeholder { color:transparent !important; }
  • |*.textbox-input:focus::-moz-placeholder { color:transparent !important; }

I'm guessing some IDs need to be added in place of the *|*, but I don't know the correct syntax to use.

I would like to hide placeholder text in the URL Address bar and Search bar ONLY, and nowhere else. I found the some CSS code that works, but it hides placeholder text in ALL text boxes, not just the URL and Web Search boxes. How should I modify the code below to restrict it so that other textboxes (such as the Quick Find / FAYT) remains unaffected? *|*.textbox-input::-moz-placeholder { color:transparent !important; } *|*.textbox-input:focus::-moz-placeholder { color:transparent !important; } I'm guessing some IDs need to be added in place of the *|*, but I don't know the correct syntax to use.

Seçilen çözüm

Add code to the userChrome.css file below the default @namespace line.


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

#urlbar *|*.textbox-input::-moz-placeholder,
#urlbar *|*.textbox-input:focus::-moz-placeholder {color:transparent!important}

#searchbar *|*.textbox-input::-moz-placeholder,
#searchbar *|*.textbox-input:focus::-moz-placeholder {color:transparent!important}

The customization files userChrome.css (user interface) and userContent.css (websites) are located in the chrome folder in the Firefox profile folder.

Bu yanıtı konu içinde okuyun 👍 1

Tüm Yanıtlar (2)

more options

Seçilen çözüm

Add code to the userChrome.css file below the default @namespace line.


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

#urlbar *|*.textbox-input::-moz-placeholder,
#urlbar *|*.textbox-input:focus::-moz-placeholder {color:transparent!important}

#searchbar *|*.textbox-input::-moz-placeholder,
#searchbar *|*.textbox-input:focus::-moz-placeholder {color:transparent!important}

The customization files userChrome.css (user interface) and userContent.css (websites) are located in the chrome folder in the Firefox profile folder.

more options

Thank you SO much cor-el.

That works perfectly!

I now have a clean address and search bar, but without affecting the search text box that's in the middle of the Firefox default home page (where the placeholder text tells you which search engine is currently selected).

It also means that I can continue to distinguish my 'quick find' from my 'quick find links only' search bars. These look identical, and only the placeholder texts lets you figure out which one is which.

Thanks again!