Return to Snippet

Revision: 18830
at October 9, 2009 14:42 by adamcoulombe


Initial Code
#myLogo {
	display:block;
	width:135px; /* change to your image width */
	height:35px; /* change to your image height */
	background:url(myLogo.gif) no-repeat;
	text-indent:-9999px;
}


/* in your HTML:

<h1 id="myLogo">My Company Name</h1>

*/

Initial URL

                                

Initial Description
This is handy for cleaning up your HTML to use more plain text and fewer img tags. Whether this is SEO friendly or not is subjective. I tend to think it's fine as long as you don't use it for spam. Digg implements a similar method for their main logo.

Initial Title
Replace HTML text with image using only CSS

Initial Tags
css, image, html, text

Initial Language
CSS