Ich möchte, dass der Header und der Footer immer am Bildschirm zu sehen sind.
Ein Freund hat mir geholfen es zu schaffen.
Das Problem ist der IE (Internetexplorer).
Ich möchte, dass es auch mit dem IE aufgerufen werden kann.
Mein CSS-Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | html, body, #wrapper { height: 100%; width: 100%; margin: 0; padding: 0; } #buttonlist { position: fixed; top: 0px; left: 0px; width: 100%; height: 5%; border-bottom: 1px solid black; background-color: red; } #buttonlist ul { list-style-type: none; } #buttonlist ul li { display: inline; } #content { padding-top: 5%; padding-bottom: 20px; overflow: auto; } #footer { position: fixed; bottom: 0px; left: 0px; height: 20px; width: 100%; border-top: 1px solid black; background-color: white; } |
Eine HTML-Datei:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Login</title> <link href="cakestyle.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <div id="buttonlist"> <!-- Header --> </div> <div id="main"> <!--Main-Teil--> </div> <div id="footer"> <!-- Footer --> </div> </div> </body> </html> |