Style Sheets
  Home arrow Style Sheets arrow Wrapping Hyperlinks with Span Tags for Ima...
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

Wrapping Hyperlinks with Span Tags for Image Replacement
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2009-12-01

    Table of Contents:
  • Wrapping Hyperlinks with Span Tags for Image Replacement
  • Review: using Fahrner's image replacement method with H2 elements
  • Styling some hyperlinks
  • Binding the CSS block to a simple XHTML document

  • 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


    Wrapping Hyperlinks with Span Tags for Image Replacement


    (Page 1 of 4 )

    In this sixth part of a multi-part series on CSS-based image replacement techniques, I demonstrate, with some easy-to-follow code samples, how to apply Fahrner’s image replacement technique to a group of web page links to make them look slightly more appealing.

    If you're a web designer who wishes to learn fashion how to implement within your own web pages the most common style-sheet-based image replacement methods developed so far, then don't look any further because this group of articles is the material that you may want to read.

    Welcome to the sixth installment of a series that provides an overview of image replacement techniques. This series gets you started using some of the most popular image replacement CSS-based approaches available at present, so you'll be able to pick the one that best suits your personal requirements and preferences.

    And now that you know what to expect from the series, it's time to make a rapid summary of the topics that were discussed in the last chapter. In that article I showed you how to implement the image replacement method originally created by Todd Fahrner with all of the H2 headers included in a sample web page.

    Essentially, this method employed a couple of additional <span> tags for hiding the text of the element being styled, which allowed us to keep its background image completely visible. Even though the method requires coding some extra markup, which from a purist's point of view can be considered a cardinal sin, it's very easy to learn and can be applied in a great variety of contexts.

    Considering the inherent flexibility offered by Fahrner's approach, in the next few lines I'll be demonstrating how to use it to decorate some basic web page links, a process that surely will be very straightforward for you, trust me.

    Now, leave the dull theory behind and join me in this didactic journey, so you can learn a few more things about this image replacement method. Let's go!

    More Style Sheets Articles
    More By Alejandro Gervasio


       · This part of the series shows how to use Fahrner's image replacement approach to...
     

    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 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek