Do more on the web, with a fast and secure browser!

Download Opera browser with:

  • built-in ad blocker
  • battery saver
  • free VPN
Download Opera
  • I often use lines this to close gaps at the top of web pages where ads would otherwise be. I "inspect element" to find the name used for the area on the given site. In this example, it's ".header-banner".

    .header-banner { display: none !important; }

    Once in a while, a site won't use a name for such an area. I'm not sure why. So I then look to Firefox's AB+ to see how it's handling it. In one case, it used this:

    ##div["white-space:nowrap;overflow: hidden; min-height:120px; margin-top:0; margin-bottom:0;"]

    But how do I use that in Opera? Appending "{ display: none !important; }" to it does nothing. I think user css is probably looking for another variation on it.


  • div[style="white-space:nowrap;overflow: hidden; min-height:120px; margin-top:0; margin-bottom:0;"] {display: none !important; }
    should work.

  • Yes, thanks!