Candid Dauth: "position:fixed;" geht doch mit IE? - Problem nicht ganz gelöst

Beitrag lesen

Hallo du da draußen,

<div>header</div>
<div id=Scrollbar für den Textframe">viel Inhalt</div>
<div>footer</div>

<-- datei.css
#Scrollbar für den Textframe { height : 80%;
                               overflow : auto;
}
-->

So halb.
1. Mach die HTML-Kommentarzeichen aus dem CSS-Code raus.
2. Positionierst du am besten alle drei Bereiche absolut. Also dann für den Header 10% und für den Footer auch, damit auch sicher der ganze Bildschirm und nicht mehr ausgefüllt wird.
3. Leerzeichen in IDs sind nicht erlaubt (aber das weißt du bestimmt).

Ich denke ich versteh, aber kannst mal bitte ein Beispiel geben? Also ganz simpel, damit auch ich es zu 100% verstehe.

Mal ein kleiner Codeausschnitt:

<body>
  <div id="header">
    bla
  </div>
  <div id="scrolling">
    bla
  </div>
  <div id="footer">
    bla
  </div>
</body>

CSS-Datei:
/* Zuerst für moderne Browser mit position:fixed */
/* ... */
html,body { top:0; left:0; bottom:0; min-height:100%; margin:0; padding:0; }
body { position:absolute; }
#header { position:fixed; top:0; left:0; right:0; height:10%; }
#footer { position:fixed; bottom:0; left:0; right:0; height:10%; }
#scrolling { margin-top:10%; margin-bottom:10%; } /* Ich bin mir nicht sicher, auf was sich jetzt die 10% beziehen */

/* Nun für den IE */

* html scrolling { position:absolute; top:0; right:0; left:0; bottom:0; overflow:scroll; padding-top:10%; padding-bottom:10%; }
* html header,* html footer { position:absolute; }

Das ist jetzt die zweite Lösung. Ich hoffe, ich habe keinen Denkfehler gemacht.

Grüße von hier drinnen, aus Biberach an der Riss,
Candid Dauth (Dogfish)

--
»Bismarck biss Mark, bis Mark Bismarck biss!«
http://cdauth.net.tc/
ie:{ fl:( br: va:} ls:[ fo:| rl:( n4:( ss:) de:> js:( ch:| sh:( mo:) zu:|