Die Funktionalität dieser Website ist durch Wartungsarbeiten eingeschränkt, die Ihr Erlebnis verbessern sollen. Wenn ein Artikel Ihr Problem nicht löst und Sie eine Frage stellen möchten, können Sie unsere Gemeinschaft über @FirefoxSupport auf Twitter, /r/firefox oder Reddit fragen.

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

userChrome.css - cant figure out the right syntax

  • 3 Antworten
  • 1 hat dieses Problem
  • 1 Aufruf
  • Letzte Antwort von pedyngro

more options

I have a transparent #nav-bar and I want all the buttons on this bar to be opaque. But when I set the background-color of any button to white, it doesnt respect the shape of the button and it makes a big rectangle over the whole bar height. But I want to change only the smaller rectangle with rounded corners, which I can see when I hover the button. Im experiencing the same problem with the background-color of .tabbrowser-tab. Is there any syntax solving this issue? Any help appreciated.

I have a transparent #nav-bar and I want all the buttons on this bar to be opaque. But when I set the background-color of any button to white, it doesnt respect the shape of the button and it makes a big rectangle over the whole bar height. But I want to change only the smaller rectangle with rounded corners, which I can see when I hover the button. Im experiencing the same problem with the background-color of .tabbrowser-tab. Is there any syntax solving this issue? Any help appreciated.

Alle Antworten (3)

more options

After hours of googling and trying I found a working code. Opaque buttons in transparent toolbar:

.toolbarbutton-icon, .toolbarbutton-badge-stack{

   background-color: white !important;

}

But I still cant figure out the syntax for hover and active...

more options

Hello there, you'll need to forward more info about the css you are using there, the "!important" only helps when website is ignoring style so you put important to set it in front. anyway the basic syntax for "hover" and "active":

.[style]:hover {

     ...

}

.[style]:active {

     ...

}

Geändert am von rety

more options

Thanks for a reply. I know, that the "!important" is sometimes superfluous, but it can't make something wrong, can it?

My problem: the syntax .tabbrowser-tab:not([selected]):hover .tab-content {} works fine, while .toolbarbutton-icon:hover, .toolbarbutton-badge-stack:hover{} doesn't work at all.

This is the whole (working) content of my userChrome.css:

.tabbrowser-tab .tab-background{background-color: rgba(242,241,244,0.7) !important;}

#nav-bar{background-color: transparent !important;}

.urlbar-page-action {display: none;}

#urlbar{opacity: 0.9 !important;}

.tabbrowser-tab:not([selected]):hover .tab-content {background-color: rgba(255,106,11,0.3) !important;}

.toolbarbutton-icon, .toolbarbutton-badge-stack{background-color: rgba(242,241,244,0.85) !important;}