magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1998 > 10 > Script Junkie  

Linking with Style

By Howard Spector

If you're like me you may have noticed that many sites are using Cascading Style Sheets (CSS) to spice up their presentations. One drawback to CSS is that Netscape Communicator 4 and Internet Explorer 4 are not on equal terms in their support of the standard. Among the more eye-catching effects you can produce with CSS Level 2 are link-text rollovers, which are supported only in IE4. This means that when Communicator users visit a site with text rollovers, nothing happens when the user moves the mouse pointer over a link. Text rollovers are created using the CSS pseudo-class hover, which Communicator doesn't support. I'll show you how to produce these effects in IE4 and how to simulate the effects in Communicator using DHTML and JavaScript.

The Workarounds

You can get around the lack of support for the hover class by using DHTML Layers, which can be updated dynamically during mouse events. I'll show you two workarounds that will help bring Communicator closer to IE4's implementation. In the first I modify the background color by accessing the bgColor attribute of the layer object that contains the text. The other workaround can change the foreground color and even the font attributes of a link, but this option is much more complex: It uses DHTML to rewrite the HTML code contained within the layer.

Link Background Colors

The HTML program in



  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2