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 > 1997 > 12 > Features  

Positioning with Cascading Style Sheets

Extending CSS to support the positioning of HTML elements

By Chuck White

When the World Wide Consortium (W3C) introduced Cascading Style Sheets (CSS1), Web designers were reluctant to incorporate them into their sites. One sore point has been that while CSS1 allows some control over positioning of HTML elements through the use of Box Properties, it doesn't provide the level of control designers want.

Fortunately, W3C has introduced CSS Positioning, an extension to CSS1 that allows you to position elements more precisely and keep better track of multiple layers. Positioning utilizes the same x, y coordinate system used in graphics programs like QuarkXPress, PageMaker, Corel Draw, and Photoshop. And while browser support for CSS has been spotty, CSS positioning actually enjoys a much more consistent level of support in Navigator 4.0 and Internet Explorer 4.0 than CSS1. So get out your text editor and a browser that's got a "4" in it, and let's see how it all works.

The ID Attribute

The ID attribute, new to HTML 4.0, assigns a name identifier to an HTML element. The name carries throughout a document, so it must be unique. Once assigned, the name can be referenced by scripts, style-sheet rules, anchors, and so on. For example, <H1 ID=differentStyle>This is it!</H1> associates differentStyle with a particular line of text.

Although the syntax involved is case-insensitive, you must use the same case selection as the rule you are accessing.




  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