matt 0

How can I disable any and all text and instead display an image.

3 answers


You are probably talking about what is called image replacement. You need to choose the method for doing this carefully, as various methods will cause other problems for you or your users. For instance, search engines won't index text that has the CSS display:none rule applied. Also what about accessibility? Will your text show up if a user has images turned off? Etc.

Here is a good article on some various methods and their associated advantages/disadvantages:

Answered almost 7 years ago by Elaine M. Rudis Jackson

Hi there, please be more descriptive about your question. Give an example scenario if you can.

display:none will disable/hide any element.

Answered almost 7 years ago by Belinda Hadiwidjaja
Tony B 86

Check this out. This is a simple way to replace text within an element. You can use any h tag or whatever element you would like.

h1#mainHeading {

height: 50px; (this is the height of the image that you are replacing the text with)

text-indent: -9999px;

background: url(/images/heading_image.jpg) 0 0 no-repeat;


Answered almost 7 years ago by Tony B