SunQuest
 
       Style Sheets
  Home arrow Style Sheets arrow Using PNG Images to Build Background Effec...
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  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
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

Using PNG Images to Build Background Effects
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 3
    2008-05-13

    Table of Contents:
  • Using PNG Images to Build Background Effects
  • Building background gradients using a simple JPG image
  • Building a basic background gradient using a GIF image
  • Building a fancy web page background with a PNG graphic: introduction

  • 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Using PNG Images to Build Background Effects


    (Page 1 of 4 )

    Cascading style sheets are great for building all sorts of eye-catching background effects for web pages. CSS allows the utilization of JPG, PNG and GIF images, which can be easily repeated along the X and Y coordinates. This facilitates the creation of professional-looking web documents by using only a few tiny background graphics that can be downloaded quickly by way of a browser.

    The use of background images for decorating certain sections of a web page is almost a must within the terrain of professional web design. Many designers only work with JPG and GIF graphics, however, due to the limited support offered by Internet Explorer 6 and below, especially when it comes to displaying transparent PNG images.

    Of course, if you’re building a simple (X)HTML list that incorporates some PNG-based bulleted items, the scenario is much more familiar. Most modern browsers will display these graphics in a consistent way. Nevertheless, things get more complicated when you try to use PNG images that include transparent sections.

    As you’ll possibly know, PNGs (also called “pings”) are excellent for building images that utilize alpha-based transparency. They make it possible to build gradients and other elegant effects that make use of this type of transparency. On the other hand, GIFs also support transparency, but in its binary version. In other words, GIF images simply won’t let you create areas that are “more transparent” than others, while PNG does.

    This issue would be old history if Internet Explorer 6 and below supported transparent PNG images, as it does with GIF graphics. But unfortunately, we don't always get what we want, do we?

    However, all is not lost when it comes to using PNG images that contain transparent areas, since it’s possible to use some workarounds that will permit you to utilize these graphics in a decent cross-browser fashion. Therefore, in this handful of hopefully instructive articles, I’m going to show you some easy-to-grasp techniques that will let you incorporate PNG-based backgrounds into your own web pages, which also will work as expected in IE 6.

    Having introduced you to the main subject of this article series, it’s time to learn how to make use of transparent PNG graphics that will be displayed correctly in most modern browsers. Let’s begin right now!

    More Style Sheets Articles
    More By Alejandro Gervasio


       · PNG images can be used to build light-weight background effects, even when Internet...
     

    STYLE SHEETS ARTICLES

    - Creating Gradients for Individual Containers...
    - Creating Gradients for Web Page Headers with...
    - SEO Scrolling Frames Problem Solved
    - Building Cross-Browser Background Effects wi...
    - CSS: Pseudo
    - Using PNG Images to Build Background Effects
    - CSS: Continuing the Clarification of CSS Cla...
    - CSS: Top Secret Classification
    - CSS: Dimensions
    - CSS: Margins and Padding
    - CSS: Crossing the Border
    - CSS: Text, Fonts, and Tables
    - CSS: Working with Text
    - CSS: Backgrounds
    - CSS for the Newbie







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway