Hi,
Consider the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
....
....
....
<asp:Panel ID="pnlCart" Runat="server" HorizontalAlign ="Center">
<asp:Table HorizontalAlign ="Center" ID="tblCart" Runat="server"
BorderColor="Wh ite" BorderStyle="So lid" BorderWidth="1" GridLines="Both ">
<asp:TableRow >
...
</asp:TableRow>
<asp:TableRow >
...
</asp:TableRow>
<asp:TableRow >
...
</asp:TableRow>
<asp:Table>
<asp:Panel>
That produces the following HTML:
<div id="pnlCart" style="text-align:center;">
<table id="tblCart" align="Center" rules="all" border="1"
style="border-color:White;bor der-width:1px;borde r-style:Solid;">
<tr>
....
</tr>
<tr>
....
</tr>
<tr>
....
</tr>
</table>
</div>
This fails validation through http://validator.w3.org/ because of the
capitalisation of "Center" in align="Center". Even changing the <asp:Table
tag to spell it with a lower-case "c" i.e. HorizontalAlign ="center" still
renders the HTML with a capital "C".
I don't want to use a textalign style, as that will center all the text
within the individual tablecells.
Has anyone else noticed this? Is there a way round it to pass XHTML
validation?
Any assistance gratefully received.
Mark