Getting Creative With Transparency in Web Design
Arm yourself with the knowledge of how different file types of images can be used to achieve transparency on web-pages. ItÃ¢â‚¬â„¢s important to first understand these basics. Then learn how to push the limitations of browser support. Take a look at what others are doing with transparency on the Web; only then youÃ¢â‚¬â„¢ll be able to learn how to get creative with transparency in Web design.
There are well-established methods of imitating Web transparency that have been developed to overcome browser support issues. While we can appreciate past solutions, itÃ¢â‚¬â„¢s important to break out of this faux methodology and learn to work with PNG graphics. We are at a tipping point where IE7 continues to grab market share. And fortunately, IE7 has thet support for full Alpha Transparent PNG graphics. In the near future, transparent PNG graphics will have excellent browser support.
Ultimately, itÃ¢â‚¬â„¢s necessary to consider creative uses for transparency on the Web. This article reviews the use of faux transparency methods, presents examples of transparent images on both fixed and dynamic backgrounds, and points to creative solutions that take full creative advantage of todayÃ¢â‚¬â„¢s modern Web transparency effects.
1. Learn How to Overcome Web Transparency Browser Limitations
There are different types of inherent limitations with creating transparency for web-sites. Currently, if youÃ¢â‚¬â„¢re going to work with PNG graphics, youÃ¢â‚¬â„¢ll need to harness IE6, which has poor support for alpha transparency. This means working with IE specific code, or scripting-based solutions.
ItÃ¢â‚¬â„¢s important to know most common ways to overcome browser limitations. There are plenty of articles across the Web that review these issues. There are two articles below that describe Conditional Comments and a script-based solution. First though, review Jeff CroftÃ¢â‚¬â„¢s article on creative use of transparent graphics, as itÃ¢â‚¬â„¢s an excellent introduction to this topic.
- Jeff Croft wrote an excellent article on the topic of using PNG graphics creatively called Creative Use of PNG Transparency in Web Design. This is the article to get started with on this subject. It covers the file formats and issues and then discusses creative transparency effects for images. It gives advice for watermarking images with PNGÃ¢â‚¬â„¢s, utilizing reversed transparent backgrounds, and other use of transparent PNG images.
- In some situations utilizing specific IE filters to display Alpha Transparency in IE6 is needed. The technique is limited, quirky, and can slow load times, but is still helpful in some situations. Review the article PNG Transparency for Internet Explorer (IE6 and Beyond) for an explanation of how to implement this solution.
- Drew McLellan wrote an elegant script-based solution for dealing with the lack of PNG support in IE6. It was released as part of last yearÃ¢â‚¬â„¢s 24 Ways project and is called Transparent PNGs in Internet Explorer 6. You may also find script-based solutions available as plug-ins for your favorite CMS or in your Javasript library of choice.
2. Faux Transparency on the Web
Faux transparency involves using images that imitate transparency with visual transparency effects. Such images can be created using applications such as Adobe Photoshop. Notice that the images used in faux solutions have no transparency data encoded, but are rather solid images that are designed to look transparent.
Of course, these solutions are not elegant in all situations. Take the case of horizontal navigation within site headers. There is a quick and common solution; you create faux transparency for each list item of the horizontal navigation. You do this by placing the background images of the horizontal navigation items absolutely to match the header background pattern.
In the case below, both the height and width are constrained on the list elements. With this type of solution you lose the ability for the design to enclose text as it gets resized. The background elements are fixed in place. Invariably, you will make some usability sacrifices when using this type of solution. Click on the photo below to view the web-site.
3. Transparent PNG Background Solutions
After reviewing Web transparency, youÃ¢â‚¬â„¢ll find out that there are strong reasons to move to PNG graphics for layout designs. They have full Alpha Transparency ability and a wide spectrum of colors. They optimize better than GIF files. However, itÃ¢â‚¬â„¢s important to notice that browser support has traditionally held back the use of transparent PNG graphics.
4. Flexible Width Transparency
If youÃ¢â‚¬â„¢d decide to place transparent images on an opposite end of the browser window, images could overlap when the window is resized. You could use the flexible width transparency technique to create an interesting effect. The Risington Podcast uses a similar effect in its footer.
Another technique is explained in this article In the Lab: Doing strange things to CSS Backgrounds. The solution is to creatively use varying percentages for background image placement. The background appears to move when the browser window is resized. Or for a more polished example that uses a similar technique view this article How to recreate SilverbackÃ¢â‚¬â„¢s Parallax.
5. Pushing the Boundaries
The example below, Raduceuca.com, has an interesting ability to drag the search around the browser window. While being not the most useful application of this technique, it is an interesting experiment, and a funny little feature for users to play with. ItÃ¢â‚¬â„¢s not implemented perfectly in IE6, see first image below. As you can see in the second images, it works great in IE7. Clearly, the designer decided to offer limited support to IE6.
When dealing with older browsers itÃ¢â‚¬â„¢s important to have a strategy in place that is in line with the actual traffic those browsers receive. Depending on the numbers, older browser based solutions could be given limited support; Or, as in the case of really old browsers, no support at all. Make sure you have a plan first, though.
Consider switching over to PNG format images for designing web layouts. Find new creative ways to use transparent images in your designs. Experiment with different uses for this technology. Develop a strategy for dealing with IE6, but ultimately look toward the future.