> Fixed positioning is not supported for IE6

This is a followup to my response per David's request.  I got the Dean
Edward's IE7 hack to fix IE fixed positioning.  I followed the
directions on Dean's site, but I'll describe it here so people can cut
and paste.

Dean's hack uses CSS overrides AND javascript to emulate broken IE CSS
behavior.

The first thing I did was force the DOCTYPE to HTML because IE6
doesn't understand XML and thus, XHTML.  I used HTML tag closures
instead of XML tag closures.

After reading Dean's docs, I detemined I only wanted the "core" fixes
and not the esoteric fixes.  I placed the core .JS fixes into a
subfolder (plugins/IE7_0_9), but it still didn't work.  After a little
testing, I found it needed the .HTC files too.  Here is the files I
placed in the subfolder:
-------------------
ie7-content.htc
ie7-load.htc
ie7-object.htc
ie7-core.js
ie7-squish.js
ie7-standard-p.js

---------------------
Here is the HTML skeleton code.  The HEADER div is fixed, but the
CONTENT div scrolls when there is enough content.  I stripped out the
extras for the purpose of demonstration:
----------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd";>
<html>
<head>

<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"></meta>

<!-- compliance patch for microsoft browsers -->
<!--[if lt IE 7]>
<script type="text/javascript" src="plugins/IE7_0_9/ie7-standard-p.js"></script>
<script type="text/javascript" src="plugins/IE7_0_9/ie7-squish.js"></script>
<![endif]-->

</head>
<body>
<div id="header">

<div id="logo">
<h1 class="companyname1">companyname1<br/><span
class="companyname2">companyname2</span></h1>
</div>

<div id="content">
<p>content content</p>
</content>
</div>
</div>
</html>

-------------------
Here is the CSS.  The only addition I made to help IE is the
FONT-SIZE: LARGE set to the "universal selector" (*).
-------------------
* {margin: 0; padding: 0; font-size: large;}

html, body {
        width: 100%;
        min-height: 100%;
        font: 0.8125em Verdana, sans-serif;
        line-height: 1;
        }

#header {
        border-bottom-style: solid;
        border-bottom-width: 5px;
        padding: 10px;
        position: fixed;
        top: 0;
        width: 100%;
        }

#logo { float: left;    }

#header p {
        font-family: Courier New,Courier,monospace;
        font-weight: bold;
        font-size: 1em;
        letter-spacing: .25em;
        padding: 1em;
        float: left;
        }
        
        

#content {
        font: 0.8125em Verdana, sans-serif;
        margin-top: 10em;
        padding-top: 10px;
        }

        
.companyname1,
.companyname2 {
        text-align: center;
        line-height: .75em;
        }

.companyname1 {
        font-size: 2em;
        font-weight: bold;
        }

.companyname2 {
        font-size: .75em;
        font-weight: normal;
        }

-Terry
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to