Sprachkurier.de : the website is made from another crew, but the owner asked me to center the website vertically in the browser, and voila´
the idea is to give a vertical dimension of an empty div of 50% to get the middle of the height, and a margin bottom negative of the value of half of the height of the content DIV that need to be centered. That means that the content need a fixed height to be positioned.
here the code
HTML
<div id=”content”>
Content here
</div>
.floater {
float:left;
height:50%;
min-height:120px;
margin-bottom:-400px;
border:1px solid transparent;
}
clear:both;
position:relative;
height: 800px
To make the border invisible I did not specified the color, or the color could be the same of the background.
NOW is a bit more cross browser 😉
Those are the regular cross browser tests we make : Internet exploder 6, 8, 9; Safari, Chrome, Opera, Firefox
on linux, mac and pc.
Monitors dimensions: 1920×1080, 1280×800, 4:3 and 16:9, netbook and Sony Ericson mobile Walkman and Android mobile phone
Nevertheless after we used our machines we let run some test on this web utility http://browsershots.org/
———————————————————————————————————