21-04-2009, 22:35
A już sie robi. Dodaj to między znaczniki head:
A to dodaj do kodu html:
Kod:
<style type="text/css">
html, body {
height: 100%;
}
body {
display: table;
width: 300px;
margin: 0 auto;
background-color: #9D1C60;
font: normal 100% sans-serif;
}
#wrapper {
display: table-cell;
vertical-align: middle;
}
#cell {
border: 3px solid #F7CEE3;
padding: 1em;
color: #FFF;
}
</style>
<!--[if lte IE 6]>
<style type="text/css">
html {
overflow-y: auto;
overflow-x: hidden;
}
body {
position: relative;
}
#wrapper {
position: absolute;
top: 50%;
}
#cell {
position: relative;
top: -50%;
}
</style>
<![endif]-->
Kod:
<div id="wrapper">
<div id="cell">
TUTAJ KOD KTÓRY BYŁ WCZESNIEJ
</div><!-- cell -->
</div><!-- wrapper -->
![[Obrazek: 2guxq1i.gif]](http://img713.imageshack.us/img713/1035/2guxq1i.gif)