Jun
20
Written by:
Steve Gray
6/20/2009 1:43 PM
The only issue that I had with IE8 was centering tables. I like to design sites that have a fixed width table centered in the browser. In IE8 the technique that I was using didn't work, the table moved to the left margin.
Here's the technique that I'm using now. If anyone has anything better, please let me know
<head runat="server">
<title></title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<head>
<body>
<form id="form1" runat="server">
<table border="1" style="width:200px;background-color:White" >
<tr>
<td>atd>
<td>btd>
<tr>
<tr>
<td>ctd>
<td>dtd>
<tr>
<table>
<form>
<body>
<html>
body
{
background-color:Gray;
text-align:center;
}
td {text-align:left}
table {
margin: 0 auto}
As always, I welcome your comments!