Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8482719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:53:30+00:00 2026-06-10T19:53:30+00:00

This article say we should avoid using this technique. This one says it’s awesome.

  • 0

This article say we should avoid using this technique. This one says it’s awesome. Is it true that Google looks inside CSS files for text-indent: -9999px; and punishes you? 😐

I’m using that property a lot to hide text. For example, I have a button that is represented by an icon:

<a href="#" class="mybutton">do Stuff</a>

The CSS:

.mybutton{
  text-indent: -9999px;
  background: transparent url(images/SpriteWithButtons.png) no-repeat 20px 20px;
  display: block;
  width: 16px;
  height: 16px;
}

I don’t see any alternative to my code. If I replace that with an image I automatically get +20 HTTP requests for each button image.

If I make the link empty, it is less accessibile because screen readers won’t know what that is. And empty links look weird, probably Google doesn’t like that either…

So what’s the best way to handle such situations?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:53:31+00:00Added an answer on June 10, 2026 at 7:53 pm

    A good reason not to use the -9999px method is that the browser has to draw a 9999px box for each element that this is applied to. Obviously, that potentially creates quite a performance hit, especially if you’re applying it to multiple elements.

    Alternative methods include this one (from zeldman.com):

    text-indent: 100%; white-space: nowrap; overflow: hidden;
    

    …or alternatively (from here):

    height: 0; overflow: hidden; padding-top: 20px;
    

    (where ‘padding-top’ is the height you want the element to be).

    I think the first method is neater, since it lets you set height in the normal way, but I’ve found the second one to work better in IE7

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First let me say that I did see this article: How to remove AspxAutoDetectCookieSupport
First let me say I have read this useful article thoroughly and am using
I have a data that looks similar to this Tables contains more than one
This article on memory leaks emphasizes that having superfluous event listeners leads to memory
This article explains how to correct an exception that's often seen when switching an
This article on MSDN states that you can use as many try catch blocks
This article says: Every prime number can be expressed as 30k±1 , 30k±7 ,
In this article by Sam Saffron, he mentions that Stack Overflow has a route
According to this http://steve-yegge.blogspot.com/2007/06/rich-programmer-food.html article, I defnitely should. Quote Gentle, yet insistent executive summary:
I came across a few articles like this one , which suggest that some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.