Style Sheets
  Home arrow Style Sheets arrow Assigning Negative Indentation to Hyperlin...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
STYLE SHEETS

Assigning Negative Indentation to Hyperlinks for Image Replacement
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2009-11-24

    Table of Contents:
  • Assigning Negative Indentation to Hyperlinks for Image Replacement
  • Review: applying image replacement to H1 and H2 HTML headers
  • Adding a fancier style to some web page links
  • Including the CSS code in a sample web page

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Assigning Negative Indentation to Hyperlinks for Image Replacement


    (Page 1 of 4 )

    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.

    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!

    More Style Sheets Articles
    More By Alejandro Gervasio


       · This third installment of the series discusses how to use Mike Rundle’s image...
     

    STYLE SHEETS ARTICLES

    - Creating Framed Pictures with CSS
    - Using a CSS Shading Effect to Decorate Images
    - Decorating Images with CSS
    - Finishing a Drop-Down Menu with the Hover CS...
    - Creating a Drop-Down Menu with the Hover CSS...
    - Building CSS-based Tooltips with the Hover P...
    - Rediscover the Hover CSS Pseudo-Class
    - Langridge`s Image Replaceement Technique: A ...
    - Using the Padding-Top CSS Property with H2 H...
    - Using the Padding-Top CSS Property for Image...
    - Using Fahrner`s Improved Image Replacement M...
    - Using Empty Span Tags with H2 Headers for Im...
    - Image Replacement with Empty Span Tags
    - Wrapping Hyperlinks with Span Tags for Image...
    - Spanning H2 Elements for Image Replacement







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 8 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek