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.

40 Responses to “Remove Text Ads from GMail”

  1. Bill Rawlinson said on October 12th, 2004 at 1:54 pm

    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. Jim Rutherford said on October 12th, 2004 at 1:57 pm

    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. Gary King said on October 12th, 2004 at 6:48 pm

    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. logi said on October 13th, 2004 at 12:51 am

    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. Soletix said on October 14th, 2004 at 12:03 am

    Isn’t

    #rh table.metatable {display: none !important;}

    the same like the above?

  6. Sandro said on October 14th, 2004 at 10:17 am

    It’s easyer to remove the ad-Iframe via Firefox-Adblock extension…

  7. Robert D. said on October 16th, 2004 at 1:23 pm

    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.

  8. Not shilling for Google. said on October 17th, 2004 at 2:36 am

    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.

  9. papuass said on October 17th, 2004 at 3:45 am

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

  10. raam said on October 17th, 2004 at 3:59 am

    great informations here. thank u!

  11. me said on October 18th, 2004 at 9:04 pm

    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!!!

  12. Paul said on January 4th, 2005 at 1:10 pm

    This article was plagairized by http://www.modzunlimited.tk/

  13. Metar Heller-Algazi said on February 28th, 2005 at 6:34 am

    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…

  14. ultramancool said on April 4th, 2005 at 3:16 pm

    i hate ads and alread killed them with RIP and all other with adblock

  15. eVox777 said on April 21st, 2005 at 3:22 pm

    it doesn’t work. :(

  16. LordSturm said on May 30th, 2005 at 4:22 am

    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…

  17. Diskdr said on November 2nd, 2005 at 6:48 am

    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.

  18. Gmail.pro » Blog Archive » Tool: Hide ads within Gmail in Firefox said on November 24th, 2005 at 6:51 pm
  19. CompuForums said on December 4th, 2005 at 1:21 pm

    That looks like a great way of removing the text ads from Gmail. I’ll try it.

    http://www.compuforums.org/

  20. raju lamichhane said on December 18th, 2005 at 4:19 am

    A Real work @ Home opportunity as an Independent Ad Typist. We offer home workers the opportunity to earn extra money from the comfort of their own home. Visit: http:// http://www.onlineadpost .com/ refid.asp? madraju Or mailto:wtz_up@hotmail.com

  21. miztiik said on December 19th, 2005 at 10:55 am

    does this work only in firefox

  22. personomies » Blog Archive » Locked in for free said on January 7th, 2006 at 10:35 pm

    […] Getting more freeloaders than “paying” customers. We do not all have the same purchasing power and inevitably, if google becomes a harbor for people with little or no cash that cost a lot in terms of usage (think users having several accounts maxed out at 2 GB of data on gmail and eliminating the ads, who permanently use gtalk, who never click on ads because they use programs that turn them off)…..well, we would need an economist to calculate all this but the bottomline is that if average revenue per user is not higher than average cost per user….there is a problem. […]

  23. rahul patel said on March 13th, 2006 at 6:08 am

    Home Based Employment Now Available

    Real companies hiring home workers.

    Work for as many companies as you like for a weekly income

    http://www.typeinternational.com/idevaffiliate/idevaffiliate.php?id=3110_39_3_79

  24. chirag patel said on March 15th, 2006 at 11:23 pm

    Now Hiring Home Based Oprder processers and Mail List Compilers.

    Get Paid directly to your paypal or stormpay account

    No waiting for payday

    http://www.typeinternational.com/idevaffiliate/idevaffiliate.php?id=3057_35_3_72

  25. THIS IS A… STATE OF TECH » Make Mozilla FireFox faster said on March 22nd, 2006 at 2:05 pm

    […] From Digital Media Minute: […]

  26. Tahir said on April 20th, 2006 at 8:08 am

    Try using ‘customizegoogle’.
    Adds anouther dimension to google. Amazing.

    http://www.customizegoogle.com/

  27. western music radio programs. Paulo Coutinho said on April 21st, 2006 at 10:59 am

    western music radio programs…

    Western music radio pr……

  28. ghanshyam patel said on April 22nd, 2006 at 6:22 am

    As a work at home combo member you will earn an income from 5 different positions.

    Start earning an income from home today

    http://www.typeinternational.com/idevaffiliate/idevaffiliate.php?id=4141_60_3_95

  29. PRAKASH MEVADA said on May 24th, 2006 at 10:14 am

    Home based Internet research Jobs

    We are now hiring home based workers to complete simple online research assignments.

    No selling – no recruiting – no adplacing

    For details visit

    http://www.typeinternational.com/idevaffiliate/idevaffiliate.php?id=4691_33_3_69

  30. Walter said on June 8th, 2006 at 4:49 am

    Great new site about hairy hairy pussy pictures atk. Millions pics and movies t2}!

  31. kenfun said on July 20th, 2006 at 6:54 am

    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.

  32. ShakaZ said on November 25th, 2006 at 11:23 am

    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

  33. Computer Forums said on January 8th, 2007 at 2:44 pm

    I’ve been using this for a while and it works well.
    http://www.compuforums.org/

  34. dep said on February 11th, 2007 at 8:02 am

    You can also download the firefox extension Stylish and then create a gmail rule with the following code:

    @-moz-document url-prefix(http://mail.google.com/) {
    #rh, #rh .c
    {
    display:none!important;
    }
    }

  35. dep said on February 11th, 2007 at 8:11 am

    Actually, after messing around a little bit more, I figured out how to expand the viewing area with the ads removed…

    Use the stylish extension and then the following code….

    @-moz-document url-prefix(http://mail.google.com/) {
    body, html {
    overflow-x:hidden!important;
    }
    #rh, #rh .c
    {
    display:none!important;
    }
    #msg_0 {
    width:820px!important;
    }
    #mb_0 div, .msg textarea {
    width:800px!important;
    }
    }

  36. Pepe said on March 14th, 2007 at 10:46 am

    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.

  37. alex said on April 12th, 2007 at 7:41 am

    hi nice site.

  38. nudemen said on June 14th, 2007 at 2:24 pm
  39. Tim said on June 24th, 2007 at 12:19 am

    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;
    }

  40. nm said on February 29th, 2008 at 8:25 pm

    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.

Leave a Reply