Style Sheets
  Home arrow Style Sheets arrow Spanning H2 Elements for Image Replacement
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

Spanning H2 Elements for Image Replacement
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-11-30

    Table of Contents:
  • Spanning H2 Elements for Image Replacement
  • Review: applying Fahrner’s IR method to the H1 header of a web page
  • Styling multiple H2 headers with Fahrner's IR method
  • The finished version of the sample web 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


    Spanning H2 Elements for Image Replacement


    (Page 1 of 4 )

    Welcome to the fifth part of a six-part series on CSS-based image replacement techniques. In this part, you'll learn how to use Todd Fahrner’s image replacement method with all of the H2 elements of a basic web page.

    Beyond their primary use, which as you know is aimed at keeping the visual presentation of one or multiple HTML pages isolated from the structural markup, style sheets have been used in the last few years for some other purposes that very often walk the thin gray area that separates both presentational and behavioral layers.

    Good examples of these “extreme” cases are drop-down menus, where the functionality of CSS is exploited not only to give the elements of the menu a pleasant look, but to define their behavior in response to specific mouse events as well. Drop-down menus aren't the only case where style sheets directly affect the behavior of web page elements; there are a few others that are equally illustrative, as you’ll see below.

    Frankly speaking, most CSS-based image replacement (IR) methods are commonly used to modify the behavior of certain web page elements to hide the elements’ inner text from display, while keeping the assigned background image visible.

    As with other techniques that involve a rather tricky use of CSS, some IR approaches are slightly harder to implement than others. That’s exactly the case with the one that I left off discussing in the last installment of this series. In that tutorial I explained how to apply the IR method created by Todd Fahrner to the H1 header of an XHTML document, which required the use of a couple of additional <span> tags to hide the text wrapped by the header via a “display: none” CSS declaration.

    In this particular case, the method was implemented with a single web page header, but it’s easy to extend its use to other text-based elements. Provided that the topic has caught your attention, in this fifth installment of the series I’ll be discussing how to apply the aforementioned IR method to all of the H2 headers included in a sample web document.

    Want to learn how this will be achieved in a few simple steps? Then begin reading right now!

    More Style Sheets Articles
    More By Alejandro Gervasio


       · This chapter of the series discusses how to use Fahrner’s image replacement method...
     

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