Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding Text using css: text-indent

I've got a company logo at the top of my site, that links back to the homepage. I'm hiding the link text using text-indent: -9999px; which seems like common practice.

To me it feels like a bit of a hack, and I'm concerned it will negatively effect my SEO.

Is this still the best way to do this?

HTML:

<a href="index.php" id="logo">My Website</a>

CSS:

#logo {
  display: block;
  width: 100px;
  height: 100px;
  overflow: hidden;
  background: url('logo.png');
  text-indent: -9999px;
}
like image 645
Dan Avatar asked Jul 18 '11 15:07

Dan


1 Answers

AFAIK google crawler doesn't see that you have moved text away from visible part of the page, it can still find out the text that you have hidden with text-indent. This shouldn't hurt the SEO. Also, if that was the case, using text-indent for the very purpose would not have been a common practice.

like image 63
Sarfraz Avatar answered Nov 15 '22 07:11

Sarfraz