Home arrow Style Sheets arrow Assigning Negative Indentation to Hyperlinks for Image Replacement
STYLE SHEETS

Assigning Negative Indentation to Hyperlinks for Image Replacement


In this third part of a six-part series on image replacement techniques, I demonstrate how easy it is to apply the image replacement method developed by Mike Rundle simultaneously to H1, H2 and <a> elements on the same XHTML page.

Author Info:
By: Alejandro Gervasio
Rating: 4 stars4 stars4 stars4 stars4 stars / 3
November 24, 2009
TABLE OF CONTENTS:
  1. · Assigning Negative Indentation to Hyperlinks for Image Replacement
  2. · Review: applying image replacement to H1 and H2 HTML headers
  3. · Adding a fancier style to some web page links
  4. · Including the CSS code in a sample web page

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Assigning Negative Indentation to Hyperlinks for Image Replacement
(Page 1 of 4 )

Commonly known by web designers by its acronym IR, Image Replacement is a group of approaches that in most cases relies on the functionality of style sheets to hide the inner text of an element on an HTML page, while its assigned background image remains visible. While at first sight, the role that IR plays currently in the terrain of modern web design seems to be somewhat irrelevant, reality tells us something radically different.

Actually, image replacement is extremely useful for decorating text-based web page elements with eye-catching images, without the need to alter (at least at a significant level) its structural markup. While many purists consider some IR approaches to be raw CSS hacks that aren’t worth looking at, the truth is that there’s a decent variety of IR techniques used nowadays that do deserve an in-depth analysis.

In consonance with this idea, in the two articles that preceded this one I demonstrated how to use the IR approach developed originally by Mike Rundle to add some fancy styles to both H1 and H2 headers of a web document. This approach bases its functionality on assigning a large negative value to the “text-indent” CSS property of the target element, in this way hiding its text from view, while revealing its background image. It’s that simple, really.

However, the previous technique is flexible enough to be applied easily to other text-based elements, including hyperlinks. Thus, in the course of this third installment of the series, I’ll be showing how to use Mike Rundle’s IR technique with some web page links.

Now, it’s time to get rid of the preliminaries and continue to explore the real power behind using CSS-based image replacement. Let’s go!


blog comments powered by Disqus
STYLE SHEETS ARTICLES

- CSS Combinators: Working with Child Combinat...
- CSS Combinators: Using General Siblings
- Intro to CSS Combinators
- CSS Semicircles and Web Page Headers
- Drawing Circular Shapes with CSS3 and Border...
- More CSS Pagination Link Templates
- CSS Pagination Links
- Animated CSS3 Image Gallery: Advanced Transi...
- CSS3 Animated Image Gallery: Transitions
- CSS3 Properties: Fixed Heights with box-sizi...
- CSS3 Properties: Altering Strokes and 3D Eff...
- CSS3 Properties: Text-Stroke
- CSS3 Transitions: Width and Height Properties
- Creating a Drop Down Menu in CSS3
- Intro to CSS Transitions

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials