ich will eine Divbox (unten "site") horziontal und veritkal zentrieren. Vertikal klappt wunderbar, aber horizontal will nicht hinhauen. Ich weiß, dass das normal mit margin: auto gehen müsste - klappt aber bei meinem Code irgenwie nicht.
Das CSS:
- Code: Alles auswählen
html {
height:99%;
}
body {
height:99%;
text-align:center;
}
#space {
width:1px;
height:50%;
margin-bottom:-230px;
float:left;
}
.site {
width:990px;
clear:left;
margin-left: auto 0;
margin-right: auto 0;
text-align:left;
border:1px solid;
border-color:#00000;
}
.site .windowRight .navi {
float:right;
}
.site .left {
float: left;
margin: 0 auto;
}
.site .windowLeft {
height: 437px;
width: 700px;
float: left; *
display: inline;
overflow:auto;
}
.site .navi2 {
clear: left;
padding-right: 90px;
word-spacing: 20px;
}
.site .windowRight {
position:relative;
height: 461px;
width: 290px;
margin-left:690px;
margin-right: auto;
}
Und das HTML dazu:
- Code: Alles auswählen
<div id="space"><br /></div>
<div class="site">
<div class="left">
<div class="windowLeft">
Content...
</div>
<p class="navi2"> Menue 2</p>
</div>
<div class="windowRight">
Menu 1
</div>
</div>
Mit negativen margin-Werte würde es klappen, aber dann wird mir beim Fenster kleiner machen alles links abgeschnitten und das will ich vermeiden.
Vielen Dank für die Hilfe!
Gruß,
lemoony

