ASP.NET Style Sheet Woes

Today I discovered that ASP.NET does not generate HTML which will validate according to XHMTL style rules. I also had a lot of problems creating a style for the web control because the BorderWidth=”0″ property creates an inline style which overrides the style class I was specifying using CssClass=”class” property. Then my style class did not work in Internet Explorer because there was no DOCTYPE so Internet Explorer was in quirky mode instead of strict mode. It took me quite awhile to figure out where to add the DOCTYPE so it appears at the top of all the ASP.NET web pages in the Community Starter Kit.

Maybe it makes me look bad that I had to struggle to do something as simple as add padding around an image. But the fact of the matter is that Microsoft created this technical hurdle when they failed to make ASP.NET observe the web standards. ASP.NET should make better use of DOCTYPEs and it shouldn’t create inline styles for web control properties when a using a style sheet is better practice.

This entry was posted in General. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit exceeded. Please complete the captcha once again.