Remove Text Ads from GMail

Do you find the text ads in GMail to be annoying? If you do, you can use Firefox to hide the ads from displaying.

This trick uses CSS and the Firefox configuration file named userContent.css . Before we start modifying our userContent.css file, I would recommend that you install an extension named ChromeEdit that simplifies the process of modifying your Firefox configuration files. So before you enter the CSS code listed below, go and install this extension (note: you’ll need to restart your browser after installation, so you may want to bookmark this page).

Now that you have CromeEdit installed, click on the Firefox Tools menu and then click on the menu item labeled Edit User Files. A new window will appear that has five tabs across the top. Click on the tab that is labeled userContent.css. Next copy the CSS code below and paste it into the userContent.css file, then click the Save button.

#rh table[class=”metatable”]{display: none !important;}
#rh div[class=”c”] {display: none !important;}

Now, restart your browser and open GMail – the ads are gone!

The above rules make use of the *!important* property value to override any rules that may already exist within the page that is being loaded. In the first rule, GMail has an element with an id of rh and we are setting the tables that have a class equal to metatable within that element, to not display (ie . display:none)

A word of caution, we are only hiding the ads from displaying. They are actually still there, just not visible. This means that Google is still indexing your email messages to provide you with “targetted ads”. It is also worth noting that as this hack is based upon creating CSS rules for existing GMail code, it is very possible that this hack will break as GMail continues to evolve.

27 thoughts on “Remove Text Ads from GMail”

  1. funny, i never even really notice the google adds.. plus, I figure I can at least let them show up since they are giving me a gig of free space.

    how annoying can they really be?

    Plus, what happens if google classes something else with the table.metatable – something you need to see?

    While it is always cool to see folks digging into the guts of things – I don’t know that hiding one thing today is safe for tomorrow.

  2. Good points Bill. Even though I can turn off the ads in GMail, I have chosen to display them. I often find some really useful links/products from the text ads.

    I figured I would post the information, as I have seen alot of people posting about how they don’t like them.

  3. Unless I see the ad-space used then I don’t see much point for this.

    I, too, do not notice the ads and don’t mind them being there, unless I can actually remove them in order to use that space to expand my email viewing area.

  4. I don’t like the ads, because they’re ads, and I don’t like ads in anything. But I can’t get this to work at all, do I just paste it at the end of the file or what?

  5. To be honest, Gmail’s text ads don’t bother me at all. They’re subtle, which is a heck of a lot more than I can say for Hotmail’s garish banners and pop-ups.

  6. Unlike some of the posts above, I’m afraid I find the text ads quite distracting and generally unpleasant to have to put up with.

    Any extraneous information presented on a page that has the sole purpose of directing the user away from that page – whether it is a bright-pink banner, a full page flash eyeblaster, or a little box of text – has to distract the user from what they are doing in order to be effective.

    If the advertisements were not distracting, nobody would clock on them. They simply wouldn’t work.

    If they didn’t work there is no way google would still be pushing them.

    Google and the other purveyors of text ads seem to think that if they tell enough people that the ads are unobtrusive then sooner or later people will start believing it.

    Maybe it will work. People tend to be idiots.

  7. Good news for not so populat languages: WhenI write in Latvian I get ZERO text ads. Google just can’t understand my texts :)

  8. You know… The adds don’t bother me during regular emails. But I do business on eBay, and for some reason their emails don’t wrap with gmail. The ad sits right over the message, and I have to copy paste the message to read it. So, I will try this out as soon as I can get back into my gmail account – server errors won’t let me in!!!

  9. Hey phuakh, Gmail has expanded their invitations, now almost every Gmail user has 50 invitations to spend… send me an E-mail, and i’ll give u an invite…

  10. Sure it works!! Just make sure you correct the mistakes the editor makes when you copy and paste the code in, when i was testing how the ads were removed i didnt notice any difference so i removed the code only to take 2 mins to find any ads, i think they shouldn’t be hidden but im going to see if it hides all google ads alltogether!!!
    FireFox will rule the galaxy…
    Damn IE…

  11. The adds are sometimes annoying, if someone emails me with a computer problem and I email a quote for a job sometimes they are give relative adds for other computer repair services. The real problem here is how they scan your mail for keywords relavent to your particular email. I don’t buy into all that gmailistoocreepy.com stuff but its just something to think about. If your using it for business they are advertising your competition. The price you pay for almost 3 gigs I guess.

  12. I enjoyed the site (seriously ) and I understand that perhaps at the moment self promotion is bad and may seem superficial, but nevertheless I cannot resist the temptation of inviting you over to my site to take a look at one thingie and to say what you think . Thanks in advance.

  13. Hello,

    i was about to apply this solution to remove those adds, but as the article suggests it will probably work for a limited time only and i’m not sure if this hack won’t prevent useful information from displaying on other websites.

    So i tried removing it with the RIP extension (Remove It Permanently) and it works fine… if you right-click at the right place you can remove the whole frame in one easy step (choose the ‘remove from this webpage’ option so you don’t have to worry about it any more)
    This method seems more adequate to me as it will be much easier to revert or modify should google change their ads-code

  14. The last one works, but also get rid of the “Print” “Show all” “Show none” “Forward all” options, I think that they are more useful than the level of annoyance of the ads
    Sorry because of my bad English.

  15. Hi, nice. I just thought of this too, but for me the following was sufficent:

    install AdBlock Plus
    define two rules:
    google.com#div(id=ra)
    google.com#div(class=rhh)

    or in a stylesheet:
    div#ra, div.rhh {
    display: none!important;
    }

  16. here’s how i do it… create a signature with the word death or dead in it – which block ads.. then make the font of the text white on white. no ads will show in messages.

Comments are closed.