Style Sheets
  Home arrow Style Sheets arrow Building a Dynamic Banner with CSS Sprites
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

Building a Dynamic Banner with CSS Sprites
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2007-02-19

    Table of Contents:
  • Building a Dynamic Banner with CSS Sprites
  • Building a banner the classic way
  • Rebuilding the dynamic banner as a two-image CSS sprite
  • Listing the complete source code for the banner

  • 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


    Building a Dynamic Banner with CSS Sprites


    (Page 1 of 4 )

    CSS sprites are a powerful technique that can be used to incorporate rollover buttons, dynamic banners, and similar elements to any web page. Sprites can also improve the overall performance of a given web site, since they minimize the number of HTTP requests made by the browser. If you’re interested in learning how to make this approach work for you, then you should start reading this article right now!

    This is the second part of the series "Using CSS Sprites." In three instructive tutorials, this series teaches you how to create CSS sprites in a few easy steps, and shows you how to use them in the context of real world applications.

    Now, stepping back to the topics that I covered in the first part of the series, you'll recall that I explained the underlying theory that surrounds the concept of CSS sprites. I also offered an extensive introduction to the subject by developing a hands-on example where a set of rollover buttons were created in a step-by-step format.

    Despite the fact that the referenced rollovers were a simple demonstration in how to use this approach in a concrete situation, it's fair to say that CSS sprites house a wealth of powerful capabilities that can be adequately exploited, particularly if you use them in a smart way.

    Most of the time, creating and implementing CSS sprites require careful planning and design of the different background images that are going to be included in a web document. This implies that the process can be more time-consuming than others. However, in certain cases the advantages of using this method with highly-overloaded web sites can be considerable because of the number of requests performed by the browser.

    Well, having described in general terms the principal benefits of utilizing CSS sprites, it's time to move forward and pay attention to the subject of this second article. Since in the first part you learned how to use CSS sprites for creating a group of rollover buttons, in this tutorial you'll see how the same concept can be applied to developing a dynamic banner.

    Provided that this topic has caught your attention, let's learn together with some illustrative code samples. Let's get started.

    More Style Sheets Articles
    More By Alejandro Gervasio


       · Over the course of this second part of the series, a sample banner is created by...
     

    STYLE SHEETS ARTICLES

    - Using a Background Grid to Assist Web Page L...
    - Extending the Rule Of Thirds for Web Page La...
    - A Two-Column Web Page Layout Based on the Ru...
    - Using the Rule Of Thirds for Web Page Layout
    - Swapping Columns Using the Divine Ratio for ...
    - Using the Golden Ratio in Liquid Web Page De...
    - Fundamental Design Principles for Web Page L...
    - Pulling Web Page Elements with the Blueprint...
    - Pushing Web Page Columns with the Blueprint ...
    - Controlling Column Padding with the Blueprin...
    - Prepending Classes in the Blueprint CSS Fram...
    - Appending Grid Units with the Blueprint CSS ...
    - Changing Grid Units in the Blueprint CSS Fra...
    - The Blueprint CSS Framework
    - Building a Liquid Design with Evened Margins...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT