Hallo Zusamen,
habe das Problem, dass ich den DIV Container nicht horizontal zentriert bekomme.
Besonders schwierig finde ich es, weil die Positionierung auf "absolut" gesetzt bleiben muss.
Danke im Voraus.
Über positives Feedback wäre ich dankbar.
Hier nun der dazu gehörende Code.
habe das Problem, dass ich den DIV Container nicht horizontal zentriert bekomme.
Besonders schwierig finde ich es, weil die Positionierung auf "absolut" gesetzt bleiben muss.
Danke im Voraus.
Über positives Feedback wäre ich dankbar.
Hier nun der dazu gehörende Code.
HTML:
<html>
<head>
<style type="text/css">
html, body { margin:0px; padding:0px; }
* { margin:0px; padding:0px; }
.so {
background-color:aquamarine;
width:auto;
margin-top:23px;
left:50%;
position:absolute;
}
ul { list-style:none; list-style-type: none; }
ul li {
height:65px;
float:left;
padding-left: 15px;
padding-right: 15px;
background-color: deeppink;
margin-right:20px;
font-family:Arial,Helvetica, sans-serif;
line-height: 65px;
color:yellow;
}
ul li:last-child { margin-right:0px; }
</style>
</head>
<body>
<div class="so">
<ul>
<li>t1</li>
<li>t2</li>
<li>t3</li>
<li>t4</li>
</ul>
</div>
</body>
</html>