The Wayback Machine - https://web.archive.org/web/20100601105828/http://www.webreference.com:80/html/tutorial24/8.html


spacer

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

home / experts / html / tutorials / 24 / 8

index123456789

Tutorial 24: Fixing Frames with Fixed Positioning

Developer News
Windows Server AppFabric, BizTalk Near Debut
Google: Over 100,000 Android Activations Daily
Novell Updates SUSE Linux Enterprise 11

The finishing touch

Of course, layout isn't everything when it comes to a style sheet, so I've added another bunch of rulesets to make our page look better.

BODY {
 background-color: #FFFFFF;
 color: #000000;
}
A:link { color: #8B7CFF }
A:visited { color: #483ACE }
A:active { color: #CC0000 }
H1, H2 {
 font-family: Arial, Hevetica, sans-serif;
 font-style: italic;
 font-size: 120%;
}
H1 {
 margin-top: 0;
 font-weight: bold;
}

/* Gecko doesn't inherit this */
#navigation, #intro, #news, 
   #copyright { background-color: #FFFFFF; }

#navigation P {
 text-align: center; 
 margin: 0;
}
#copyright P {
 margin: 0;
 font-size: smaller;
 text-align: right;
}

Some interesting notes on this style sheet: First of all, I have revealed a little bug in Gecko, since the fixed elements should have a transparent background, but actually look gray, so I've explicitly set their background to white (I've reported this bug, and expect it be fixed by the time Navigator 6.0 and Mozilla 1.0 are released).

Also, I've set the margins of the paragraphs in both the navigation and copyright sections to 0 so that they can fit into the 1.4em and 1.2em heights we've given them respectively, giving us a nice, compact layout. I've also set the top margins of the two H1 elements to 0 so that they sit at the very top of their frames.

Adding some stylistic touches like fonts and colors to the element's contents gives us some very pleasing results.

Acme's framed homepage on Netscape Navigator 6.0PR2
Acme's framed homepage on Netscape Navigator 6.0PR2 [Full-sized image]

index123456789

Next Page...

http://www.internet.com/

Internet.com
The Network for Technology Professionals

Search:

About Internet.com
Copyright 2010 QuinStreet Inc. All Rights Reserved.

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
A Sitemap Makes Your Website More Google Friendly · Locale-sensitive Operations and Services in International Java Applications · Create Any Type of Form You Like on Your WordPress Site
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
May Madness - Fascinating Acquisitions Surrounding IBM DB2 and Sybase · Small Business Marketing: Customer Service Gone Wrong · Google Predicts Mobile Ad Surge as AdMob Deal Closes

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

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.