Forum Moderators: not2easy
I have a div that I generally use for centering- just simply a text-align:center sort of thing. Works OK for IE, will center just about anything. But for Netscape, this will not center a table (probably correctly, a table is not text!)
So, what sort of things should I use to center a table?
Thanks!
Dave
.box2 {
position: relative;
width:129px;
padding-top:.2em;
padding-bottom:.2em;
left:2px;
border: 1px solid #336393;
text-align:left;
align:center;
background:#ECF0F4;
}
does not seem to work there. I tried:
<div class="box2" align="center">
And that did not center, either....
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Untitled</title>
<style type="text/css">
.centre {width:500px; margin: 0 auto; border:1px solid #000;}
</style>
</head><table class="centre">
<tr><td> this is a table!</td></tr>
</table></body>
</html>
hope that's what you were after :-)
cheers!
Stratus