Page is a not externally linkable
- WebmasterWorld
-- Accessibility and Usability
---- accessibility and <h1> header images


bedlam - 2:08 am on Feb 9, 2009 (gmt 0)


Well if the question is this:

Does hiding text with "Display None" affect SEO?

Then, absent an actual answer, the solution should not contain this:

h1 b { display:none; }

'display:none' has also been known to hide content from some users [css-discuss.incutio.com] (though I can't determine the current status of this issue).

In any case, 'display:none' is not required for image replacement since there are at least two other methods of accomplishing a similar result:

With padding
<h1 id="replace_1">Lorem ipsum dolor sit</h1>

#replace_1 {
/* Hide the text */
height:1px;
overflow:hidden;
/* Make room for the background image (assuming 200px x 30px) */
padding-top:29px;
width:200px;
/* Show the background image */
background:transparent url(path/to/image.png) no-repeat top left;
}

With text-indent
<h1 id="replace_1">Lorem ipsum dolor sit</h1>

#replace_1 {
/* Make room */
text-indent:-999em;
overflow:hidden;
width:200px;
height:0px;
/* Show background */
background:transparent url(path/to/image.png) no-repeat top left;
}

With images instead of background images
<h1 id="replace_1"><img src="path/to/image.png" alt="image: Lorem ipsum dolor sit" width="200" height="30" />Lorem ipsum dolor sit</h1>

#replace_1 {
width:200px;
height:30px;
position:relative;
}
#replace_1 img {
position:absolute;
top:0;
left:0;
}

As you've already pointed out, this is arguably one of the better methods, though the purist in me thinks a background image should be used in this context :)

For more information, have a look at some of these threads [google.ca].

-- b


Thread source:: http://www.webmasterworld.com/accessibility_usability/3844966.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com