Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am using CSS sprites for buttons on my website, They are used for stop/play/download etc. If I'm using for example an <i class="preview">preview "track name"</i> play button with the text then I hide the text using text-indent:-9999px.

Would this be enough to get penalised? (keep in mind there can be 60 products per page and each will have 3 sprites with hidden text!)

share|improve this question

4 Answers 4

up vote 4 down vote accepted

You'll be fine. Hidden text is only a problem when it is done for the purposes of manipulating the search engines. It's not what you do but why you do it that causes most penalties and this is a perfect example of that. Hidden text in this example is simply a fallback for users who do not have CSS capabilities (rare these days for users but bots are a different story as are screen readers).

share|improve this answer
    
thats true, although the text doesn't really add any new information to the page! so perhaps removing this wouldn't be a bad thing! infact i will remove the hidden texts and report back at a later date! –  Treemonkey Oct 4 '10 at 14:40
    
It doesn't have to be new information. Just an alternate version of the information contained in the sprite. Now if this information isn't available in the sprites then this would be a bad example of hidden text and should be removed. –  John Conde Oct 4 '10 at 14:41
    
well I removed the hidden text and my page is now ranking properly, previously the site homepage was not in the serps at all unless searching for the domain name! –  Treemonkey Oct 5 '10 at 8:18

Agreeing fully with John Conde's answer, I want to warn you not to remove the text.

Removing the text will remove information out of the page. Search engines cannot read images, let alone CSS sprites; expect to drop in their rankings. Screen readers used by blind people cannot read or describe images; expect to get disappointed customers.

Finally, I do not know the legal context in your country, but removing that text will make your website inaccessible to blind people, and that may lead to legal problems.

share|improve this answer

If you plan on using CSS spriting with your <a> tags directly (which is probably the best way to do it for links) you should definitely make sure to have an alt property in each of your sprited image links that explains what the link is to with a few words.

This can literally be the text of what your link image. This will also solve the issue of how your site works for the blind as pages for the blind will read the alt tags. Doing this may allow you to not need the extra hiddens tags though I don't think having them will cause any specific issue.

share|improve this answer

Don't remove it, it's good for you as long as the text written in the element "makes sense" in relation to your icons. Also, you may add additional descriptors through the "title" attribute if you so choose.

I'm not going to pretend to be an expert and say it will improve your SEO, but following logic and how Google for example likes well formatted HTML, I can only assume it reads everything and utilizes all relevant information to analyze and rank your site.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.