Monday, August 28, 2006
While I'm on a CSS-related rant, why does ASP.NET 2.0 embed display:inline-block?
I'm doing some maintenance on our websites today and am running into a CSS Validator error message and I don't know how to fix it or whether or not it's an ASP.NET 2.0 bug.
Here's the code:
Where's all this going? Well, when it renders the header, it adds "style=display:inline-block;" to the hyperlink causing it to fail CSS 2.0 validation. AS of this writing, you can run this against the validator: Validate LearnDTS.com CSS and the first line is the error about the inline-block.
I *think* this is an ASP.NET 2.0 bug since I've read comments from the ASP.NET folks (on blogs, of course) that say they tried to be 100% compliant with known standards at RTM.
Am I wrong - is this not a bug but a design? I don't know and a Google search comes up empty.
Any ideas?
Here's the code:
Now for the web.config:<%@ Control Language="c#" %>
<!-- you must close the TD inline or else IE breaks a new line -->
<table cellpadding="0" cellspacing="0">
<tr>
<td height="17" colspan="2" style="background-image: url(/images/Generic/toplines.gif)"></td>
</tr>
<tr>
<td width="235" align="center" bgcolor="white" style="padding-right: 8px; padding-left: 8px;border: 2px solid black;">
<asp:HyperLink ID="parentSite" runat="server" ImageUrl="/images/Generic/logo.gif" Height="57" Width="235" NavigateUrl="http://www.learnitfirst.com"><img src="/images/Generic/logo.gif" width="235" height="57" alt="LearnItFirst.com" border="0" /></asp:HyperLink>
</td>
</tr>
</table>
<xhtmlConformance mode="Transitional"/>(I also tried with "Strict" but had same issue)
Where's all this going? Well, when it renders the header, it adds "style=display:inline-block;" to the hyperlink causing it to fail CSS 2.0 validation. AS of this writing, you can run this against the validator: Validate LearnDTS.com CSS and the first line is the error about the inline-block.
I *think* this is an ASP.NET 2.0 bug since I've read comments from the ASP.NET folks (on blogs, of course) that say they tried to be 100% compliant with known standards at RTM.
Am I wrong - is this not a bug but a design? I don't know and a Google search comes up empty.
Any ideas?
Technorati Tags: CSS, CSS Validation