html prob

Miscellaneous Forums/General Discussion/html prob

how the heck can i center a table in a browser window horiz AND vert? must be a simple way

You can try making the height property a percent. That might do what you need.

dont seem to work ¬_¬

Sorry. Something more like this maybe
<html>
<head>
<style type="text/css">
.centered {
  position: absolute;
  top: 25%;
  left: 25%;
  bottom: 25%;
  width: 50%;
  height: 50%;
  margin-top:-25%;
  margin-left:-25%;
  margin: auto;
} 
</style></head>
<body>
<div class="centered">
<table border=5 cellpadding=0 cellspacing=0 width=100% height=100%>
<tr><td><center>Testing</center></td></tr>
</table>
</div>
</body></html>


perfect thanks