Name: Anonymous 2010-12-17 16:15
How to put a div in the center (Vertical and horizontal) of a HTML page ?
Google gives me answers but as I know neither the width and the height of the div, I can't use them.
There also is something like :
#wrapper {
z-index:1;
width:100%;
height:100%;
display:table;
}
#cell {
display:table-cell;
vertical-align:middle;
}
<div id="wrapper">
<div id="cell">
<div id="content">
</div>
</div>
</div>
But I can't seem to have it working.
Google gives me answers but as I know neither the width and the height of the div, I can't use them.
There also is something like :
#wrapper {
z-index:1;
width:100%;
height:100%;
display:table;
}
#cell {
display:table-cell;
vertical-align:middle;
}
<div id="wrapper">
<div id="cell">
<div id="content">
</div>
</div>
</div>
But I can't seem to have it working.