Content last modified Monday 6 March 2017
hop to #bottom
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
Article modified:
15 May 2005

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Commenting is closed for this article.

Commented (2)

Aaron Boswell:
Yes. The Phark Method. I had forgotten the name. I wasn’t referring to the method as much as saying how easy it was to use standard TXP code to make the change. If this is a “well, duh” kind of post, I will delete it, but I have found it useful.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.




There are also tag clouds, 'cause those are fun.
Published with Textpattern