Sie sind nicht angemeldet.
Liquidator
Senior Member
TrOuble
God
![]() |
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<!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> <title></title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="wrapper"> <div id="container"> </div> </div> </body> </html> |
![]() |
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
* { margin:0; padding:0; } #container { width:100%; height:500px; background-color:red; position:relative; top:50%; margin-top:-250px; } #wrapper { position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; } |
TrOuble
God
Zitat von »Y0Gi«
Ich positioniere vertikal zentriert mit einer Kombination aus
line-height: ?;
margin: auto;
vertical-align: middle;
und möglicherweise noch anderen. `line-height` wende ich dabei auf einen Wrapper-Container an.
Zitat von »Liq«
dankööö...hat geklappt
![]() |
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
ol.images { list-style: none; margin: 0; padding: 0; } ol.images li { float: left; height: 190px; margin: 4px; text-align: center; width: 156px; } ol.images li div { line-height: 156px; } ol.images li img { margin: auto; vertical-align: middle; } |
![]() |
Quellcode |
1 2 3 4 5 6 7 |
<ol class="images"> <li><a href="#"><div><img src="..." alt="..." /></div>Caption</a></li> <li><a href="#"><div><img src="..." alt="..." /></div>Caption</a></li> <li><a href="#"><div><img src="..." alt="..." /></div>Caption</a></li> <li><a href="#"><div><img src="..." alt="..." /></div>Caption</a></li> <li><a href="#"><div><img src="..." alt="..." /></div>Caption</a></li> </ol> |
-