Dead Center

This is an absolutely-positioned div. It is positioned 50% from the top and left. A negative top margin and left margin are applied; values are 1/2 of the size of the div.

Qualifications/dangers:

1) you have to have a known height for this to work (works well for e.g. a Flash file).

2) If the browser is resized too small, the top content will be lost from view.

3) Even Dreamweaver (in Design View) is affected: you will need to work in code view if your text gets too long.

#centered {
position: absolute;
top: 50%;
left: 50%;
width: 500px;
height: 300px;
background-color: #5d0708;
color: #fff;
border: 1px solid #000;
padding: 10px;
margin-left: -261px;
margin-top: -161px;
overflow: auto;
}

Tested on Windows in Internet Explorer 6, 5.5, 5.01, Firefox 1.5.01, and Opera 8.51. In IE 4.01, the negative margin does not work, so the div sits at the bottom of the window.