Ich hab ein problem nämlich will ich meinen Seite... ins center setzen doch es funktioniert irgendwie nicht
wenn ich im body
position:absolute; left:5%; zb schreibe, verschiebt er alles um diese 5% aber ich will alles in die mitte setzen
und wenns geht, falls das fenster zu klein wird für alles, dass von rechts nach links die seite "verschwindet"
Code:
body{ cursor:crosshair; font-family:Arial; font-size:15px; background-color:#C1D2EC; } .test1{ background-color:#FFFFFF; border:2px solid #C1D2EC; } .test2{ background-color:#FFFFFF; border:2px solid #C1D2EC; } #links{ position:absolute; left:20px; top:145px; width:150px; height:600px; } #oben{ position:absolute; left:20px; top:20px; width:1010px; height:120px; } #rechts{ position:absolute; left:880px; top:145px; width:150px; height:600px; } #mitte{ position:absolute; left:175px; top:145px; width:700px; height:600px; } #unten{ position:absolute; left:20px; top:750px; width:1010px; height:20px; }
Code:
<html> <head> <link rel="stylesheet" type="text/css" href="css.css"> </head> <body> <div id="links" class="test1">Test </div> <div id="oben" class="test1">Test </div> <div id="rechts" class="test1">Test </div> <div id="mitte" class="test2">Test </div> <div id="unten" class="test1">Test </div> </body> </html>
position:absolute; left:5%; zb schreibe, verschiebt er alles um diese 5% aber ich will alles in die mitte setzen
und wenns geht, falls das fenster zu klein wird für alles, dass von rechts nach links die seite "verschwindet"