I have a pure CSS modal dialog set up like this
div {
position:fixed;
top:50%;
left:50%;
margin:-26% 0 0 -26%;
width:46%;
height:46%;
padding:3%;
}
This div displays centered in webkit browsers. In FF however, it’s almost touching the top of the screen.
Rather than using margins, you could do:
http://jsfiddle.net/wwRUT/2/
I don’t think I’d combine margins and fixed positioning.