Firefox, Seamonkey, Camino, and other Gecko-based products allow users to create their own custom CSS rules for adjusting font sizes, layouts, colors, etc. to his/her liking. One of the benefits of this is the ability to hide certain elements based on their attributes and values. In the case of banners, the ad-related objects (object, embed, image, etc) are downloaded, just not displayed.

You could think of this as the poor man's ad-filter, but there are many things CSS can do that a proxy cannot, such as handling malformed html and blocking entire <div>'s (like floating "pop-ups"), <table>'s or even <form>'s as this is tied directly into Mozilla. Obviously, each method has pros and cons, sometimes combining them can bring the best results.

Basic Setup:
  Copy ad_blocking.css to <profile_folder>/chrome/userContent.css.

This is a stable configuration that filters on common patterns and object sizes only.

Advanced Setup:
  Copy ad_blocking.css, sites.css to <profile_folder>/chrome/.

Then add the following to the top of userContent.css (create if necessary):

@import url("ad_blocking.css");
@import url("sites.css");

This configuration allows me to keep the core ad-blocking (ad_blocking.css) separate from my own customizations (style.css) and the more questionable, site-specific ad-blocking (sites.css). style.css is optional and may not be of use to everyone, except perhaps as a template for your personal customization. sites.css has some goodies for Google,, and others.

Old versions still available: ad_blocking.css-1.0, sites.css.old, style.css.old.

Note: sites.css and style.css utilize -moz-document, which requires Gecko 1.8+, and will be useless without.

Image Blocking:
  Copy hostperm.1 to <profile_folder>/.

The use of Mozilla's builtin image blocking is recommended and can be more effective than CSS filtering. The above links are dynamically generated from's (frequently updated) ad-server list. Take care to not overwrite any existing file as you may already have other image, cookie, or popup permissions configured, instead merge the two.

Warning: Use of hostperm.1 is deprecated in Gecko 1.9+.

A more aggressive method would be to block all 3rd party images (those which do not originate from the server you are currently at). This would likely have a success rate near 100%, but would also catch many images hosted by content mirror companies like Akamai and Mirror-Image. This could prove to be rather high maintenance with all of the whitelisting, but if you feel this is for you: about:config -> permissions.default.image -> 3 .

  Install and import a filter.

One of the better ad-blocking extensions, AdBlock is definitely worth some serious consideration. Mozilla's builtin image blocking is nice, but it cannot handle the range of objects that AdBlock can. Most of the time, all or part of the code related to ads (and popups) is sourced from an external javascript file, which is easily blocked by even the most basic of filters. I used a semi-official filter for several months and it worked well. Various exist, but many prefer Filterset.G.

Related: Firefox Help: Ad-Blocking, Privoxy, AdBlock, AdBlock Plus, Stylish.