M
Mark Rae
Hi,
Consider the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
....
....
....
<aspanel ID="pnlCart" Runat="server" HorizontalAlign="Center">
<asp:Table HorizontalAlign="Center" ID="tblCart" Runat="server"
BorderColor="White" BorderStyle="Solid" BorderWidth="1" GridLines="Both">
<asp:TableRow>
...
</asp:TableRow>
<asp:TableRow>
...
</asp:TableRow>
<asp:TableRow>
...
</asp:TableRow>
<asp:Table>
<aspanel>
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;border-width:1px;border-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
Consider the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
....
....
....
<aspanel ID="pnlCart" Runat="server" HorizontalAlign="Center">
<asp:Table HorizontalAlign="Center" ID="tblCart" Runat="server"
BorderColor="White" BorderStyle="Solid" BorderWidth="1" GridLines="Both">
<asp:TableRow>
...
</asp:TableRow>
<asp:TableRow>
...
</asp:TableRow>
<asp:TableRow>
...
</asp:TableRow>
<asp:Table>
<aspanel>
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;border-width:1px;border-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