CSS Not Working
-
Hello, I use Ubuntu 22.04 and installed Vivaldi. Small issue that I see is I imported my CSS file from a Windows computer. When I try to run the change the color of the selected tab in CSS it won't work for some odd reason. Here's the CSS code:
#browser .tab-position .tab.active {background-color: green; color: white !important;}
That works in Windows, Ubuntu it doesn't. My other CSS is working fine. If I put in a comma after .tab-position then it will change all tabs, but the selected one stays black. I like it the other way where they're black and the selected on is green. Before you say I don't have to do it using CSS. The other way under settings didn't work. Because it changes the whole top under the tab bar. Which I don't really like.
Thanks
-
@twisted8000 I can not test at this time.
#browser .tab-position .tab.active { background-color: green !important; color: white !important; }
But if you want to override a CSS from UI you have to add
!important
to all rules, not only the last. -
@DoctorG said in CSS Not Working:
#browser .tab-position .tab.active {
background-color: green !important;
color: white !important;
}Beautiful, that worked.
Thanks
-
@DoctorG said in CSS Not Working:
But if you want to override a CSS from UI you have to add !important to all rules, not only the last.
Well, it depends ... on specificity:
https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity -
@Pathduck said in CSS Not Working:
it depends ... on specificity:
Well, not very easy to decide which rule has precedence for regular users, that'S why mostly !important is used.