Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
aboswell
About It:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

Image Replacement without plugins

This is really simple. Here is the code (your code may look somewhat different):

<div class="<txp:section />"><h2><txp:section /></h2></div>

Or if you want to use the great plugin by spchampion:

<div class="<txp:section />"><h2><txp:spc_section_alias_name /></h2></div>

Then make sure the section and CSS class(or id) you are using match up. In this case, “web” or with the section alias “Web Design”. Here is my CSS below to illustrate:

.web h2 {
position: absolute;
top: 0px;
left: 12px;
width: 125px;
height: 19px;
font-size: 0px;
text-indent: -700em;
background: url(images/headers/web.gif);
}

Your mileage may vary, but I thought it was a really simple way to not have to use a bunch of if statements.

Article Request Count:
Posted here:
15 May 2005

You know you want to visit the Archives.
Published with Textpattern