Cyperfriend
Der ohne Avatar
- Registriert
- 14 Juli 2013
- Beiträge
- 1.123
Ich habe eine Headerbox und darin mehrere andere Boxen. Erstmal ein Bild:
Anhang anzeigen 26026
Die ersten beiden Boxen (links und mitte) sind richtig, aber die Box die rechts sein soll will sich einfach nicht unten anordnen. Ich kann machen was ich will. Eigentlich hätte ich erwartet, dass ein float:right hilft, aber das wird einfach ignoriert.
Hier mal der HTML-Code:
[src=html5]
<!-- Anfang Header -->
<div id="header">
<!-- Anfang Serverzeit -->
<div id="servertime">
Serverzeit: <?php echo date("H:i:s"); ?> Uhr
</div>
<!-- Ende Serverzeit -->
<!-- Anfang Box -->
<div id="box">
<ul>
<li>Test 1</li>
<li>Test 2</li>
<li>Test 3</li>
<li>Test 4</li>
</ul>
</div>
<!-- Ende Box -->
<!-- Anfang Benutzername -->
<div id="loggedin">
Angemeldet als: Max Mustermann
</div>
<!-- Ende Benutzername -->
</div>
<!-- Ende Header -->
[/src]
[src=css]
#header {
/* Blau */
background-color:#09F;
height:100px;
position:relative;
}
#servertime {
/* Gelb */
background-color:#CF3;
position:absolute;
bottom:0;
float:left;
margin-bottom:5px;
margin-left:5px;
opacity:0.8;
border:1px solid #000;
padding-left:5px;
width:140px;
}
#box {
/* Gelb */
background-color:#CF3;
position:absolute;
bottom:0;
width:424px;
left:50%;
margin-left:-212px;
margin-bottom:5px;
opacity:0.8;
}
#box ul {
list-style-type:none;
}
#box li {
float:left;
border:1px solid #000;
border-collapse:collapse;
margin-right:-1px;
padding-left:5px;
width:100px;
}
#loggedin {
/* Gelb */
background-color:#CF3;
margin-right:5px;
float:right;
bottom:0;
opacity:0.8;
border:1px solid #000;
padding-left:5px;
}
[/src]
Anhang anzeigen 26026
Die ersten beiden Boxen (links und mitte) sind richtig, aber die Box die rechts sein soll will sich einfach nicht unten anordnen. Ich kann machen was ich will. Eigentlich hätte ich erwartet, dass ein float:right hilft, aber das wird einfach ignoriert.
Hier mal der HTML-Code:
[src=html5]
<!-- Anfang Header -->
<div id="header">
<!-- Anfang Serverzeit -->
<div id="servertime">
Serverzeit: <?php echo date("H:i:s"); ?> Uhr
</div>
<!-- Ende Serverzeit -->
<!-- Anfang Box -->
<div id="box">
<ul>
<li>Test 1</li>
<li>Test 2</li>
<li>Test 3</li>
<li>Test 4</li>
</ul>
</div>
<!-- Ende Box -->
<!-- Anfang Benutzername -->
<div id="loggedin">
Angemeldet als: Max Mustermann
</div>
<!-- Ende Benutzername -->
</div>
<!-- Ende Header -->
[/src]
[src=css]
#header {
/* Blau */
background-color:#09F;
height:100px;
position:relative;
}
#servertime {
/* Gelb */
background-color:#CF3;
position:absolute;
bottom:0;
float:left;
margin-bottom:5px;
margin-left:5px;
opacity:0.8;
border:1px solid #000;
padding-left:5px;
width:140px;
}
#box {
/* Gelb */
background-color:#CF3;
position:absolute;
bottom:0;
width:424px;
left:50%;
margin-left:-212px;
margin-bottom:5px;
opacity:0.8;
}
#box ul {
list-style-type:none;
}
#box li {
float:left;
border:1px solid #000;
border-collapse:collapse;
margin-right:-1px;
padding-left:5px;
width:100px;
}
#loggedin {
/* Gelb */
background-color:#CF3;
margin-right:5px;
float:right;
bottom:0;
opacity:0.8;
border:1px solid #000;
padding-left:5px;
}
[/src]