Forum Moderators: not2easy
Some believe using text-indent to hide the anchor text is blackhat/spam.
I do not want to go and customize the wording for each button of each product for fear that it will be considered keyword stuffing OR overloading the page with certain keywords.
My advice would be to use a conventional <a><img></a> rollover if you can't style the text satisfactorily with CSS.
I've been doing this for years and is completely false from what I can tell.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
.button, .button span {
width:100px;
height:25px;
position:relative;
overflow:hidden;
display:block;
}
.button span {
position:absolute;
top:0;
left:0;
background:url(images/button/gif) no-repeat 0 0;
}
</style>
</head>
<body>
<p><a class="button" href="#">Button text<span></span></a></p>
</body>
</html>
Backtracking: If the anchor text isn't visible, why is it there at all?
I read the original question too fast and missed the "image has text on the button" part. So I thought you were describing Mystery Meat Navigation and was all set to deliver some very emphatic opinions ;)
Backtracking: If the anchor text isn't visible, why is it there at all? Wouldn't the "alt" attribute of the image serve the same purpose? In fact it had better do so, since that's what your image-less users would see.