dcsimg
 

Submitted by: Octavia Anghel(octaviaanghel@gmail.com)

Wednesday Jul 18th 2018 by Octavia Anghel

Language: Web, Expertise: Intermediate - Learn how to replace a text-based title with an image.

The snippet of code below is a common practice to replace <h1>title</h1> from a text-based title to an image:

h1 {

text-indent:-9999px;

background:url("title.jpg") no-repeat;

width:100px;

height:50px;

}

Explanation: text-indent:-9999px; throws your text title off screen, replaced by an image declared by background: {...} with a fixed width and height.

Home
Mobile Site | Full Site