Problem hiding ads on page with css

I am trying to hide the ads on this page but it doesn’t seem to work:
http://www.hulkusc.com/watch-fox-news-live-streaming/

I am using Stylish in Firefox and i am trying to hide the elements by id:

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document url("http://www.hulkusc.com/watch-fox-news-live-streaming/")
  #dk1 {
    
  display:none !important;
}

  #adContent-clickOverlay {
    
  display:none !important;

}

But the code doesn’t hide the ads. Can someone tell me why the code doesn’t work? I am not very advanced with css.

Thanks!

If you have ads on your webpage, why would you want to hide them? And why don’t you just remove the code that displays the ads instead of trying to hide them?

Unless the ads are from another website’s content, in which case the content is probably copyrighted. Do you have permission to display this content?

Please excuse me if I have misinterpreted what you want to do.

This is not my site. Ads are just annoying, that’s why i want to hide them.

Is it not easier to just install AdBlock Plus or a similar ad-blocker?

2 Likes

Have you thought of using an Ad Blocker?

It won’t let you use the site if you are using Ad Blocker.

Did you forget to add the closing curly bracket on the page like you did here?

1 Like

Ok, so this is not your site but one that you frequently visit?

If so set those styles directly into your userContent.css file located in your chrome folder which is in the profile folder.

Bypass Stylish altogether

2 Likes

Where i have to add the closing bracket? I am not very experienced with css.

Nevermind, i got it. I added the brackets and now the code is working.

Glad you got it working! Now you are a little more experienced.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.