spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / html / tutorials / 24 / 2

index123456789

Tutorial 24: Fixing Frames with Fixed Positioning


Search
The Business Internet

Developer News
SaaS Tool Offers Custom Database Development
Microsoft’s Automated Agent: Can We Talk?
Borland Finally Sells CodeGear

The trouble with browsers

The trouble with fixed positioning until recently was that it only existed in theory in the CSS2 specification. The fixed value for the position property was ignored by all CSS-enabled browsers.

Recently, the brilliant guys over at the Mozilla project have worked fixed positioning support into Gecko, which finally allows us to play with it. What prevents us from playing it very much, however, is that Internet Explorer and Navigator 4.x will handle fixed positioning with their usual, inimitable style, doing completely unpredictable things.

Well, that's not entirely true. These things, though no less troublesome, are quite predictable. You see, in order to use fixed positioning, you need to set the position property for your positioned element to fixed, which is not so much of a problem since, as I said, these browsers ignore it. However, you also need to play around with properties such as height, width, top and left that these browsers do recognize. Unfortunately, using your values for these properties without the fixed positioning may cause various ugly effects that you would like to avoid.

To address this problem, I've come up with some simple guidelines that you can use when designing pages with fixed positioning. If you stick to these guidelines, then Gecko and any other browser that complies to the CSS2 specification will display the framed section correctly, while Navigator 4.x and Internet Explorer will stick to a regular, one-section-after-the-other layout.

Predictably, even Gecko isn't faultless; I have had to work around one little bug in Gecko in our example. Before you rush to do the same, I have submitted both bugs to Bugzilla and expect them to be fixed in a build any day now.

To view all of the examples in this tutorial, you will need a browser using a relatively recent build of Gecko. Netscape Navigator 6.0 Preview Release 2 is a good example of such a browser, but you can also use a recent nightly or milestone build of Mozilla or any of the browsers that use Gecko popping up around the place, such as the ultra-slick Galeon.

index123456789

Next Page...

http://www.internet.com/



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
How to Create an Ajax Autocomplete Text Field: Part 6 · Software Engineering for Ajax · Perl Pragma Primer
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Using File Virtualization for Disaster Recovery · VoIP Security: SIP—Versatile but Vulnerable · Around the World in 80 Nodes

URL: http://www.webreference.com/html/tutorial24/2.html

Produced by Stephanos Piperoglou
Created: August 24, 2000
Revised: August 29, 2000