- From: Matthew Brealey <thelawnet@yahoo.com>
- Date: Mon, 1 Nov 1999 08:30:24 -0800 (PST)
- To: www-style <www-style@w3.org>
The CSS spec gives an example for fixed positioning: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <HTML> <HEAD> <TITLE>A frame document with CSS2</TITLE> <STYLE type="text/css"> BODY { height: 8.5in } /* Required for percentage heights below */ #header { position: fixed; width: 100%; height: 15%; top: 0; right: 0; bottom: auto; left: 0; } #sidebar { position: fixed; width: 10em; height: auto; top: 15%; right: auto; bottom: 100px; left: 0; } #main { position: fixed; width: auto; height: auto; top: 15%; right: 0; bottom: 100px; left: 10em; } #footer { position: fixed; width: 100%; height: 100px; top: auto; right: 0; bottom: 0; left: 0; } </STYLE> </HEAD> <BODY> <DIV id="header"> ... </DIV> <DIV id="sidebar"> ... </DIV> <DIV id="main"> ... </DIV> <DIV id="footer"> ... </DIV> </BODY> </HTML> How is anyone expected to use fixed positioning when you have to specify the height of the initial containing block. This deficiency makes fixed positioning entirely unusable for this kind of design. However, the simple addition of the keyword 'viewport' to height solves all the problems. Thus height: viewport. ===== __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com
Received on Monday, 1 November 1999 11:20:58 UTC