1 reply [Last post]
Northumberland, England
Last seen: 13 years 32 weeks ago
Northumberland, England
Joined: 2004-06-30
Posts: 28
Points: 0

Thought i'd post this separate to my other post i just put up.

This might be a bit of a silly question but....
Does anyone know whether a page will act differently in regards to displaying CSS if it's saved as asp.net? like .aspx because i've tried previewing my page in IE and it seems to display fine except for the asp.net elements, but i'm putting that down to the fact that its not on a proper testing server. It doesn't however display properly in firefox, is this because of the same reason? I haven't tried opera yet.

There's no differences or problems that might arise are there?

Cheers Daf

co2's picture
Last seen: 13 years 40 weeks ago
Joined: 2003-09-17
Posts: 721
Points: 0

ASP.net and CSS

Theoretically you can control the outputted HTML elements from the ASPX with CSS. However, in practice, whilst generally achievable, can have serious problems. Mainly that, ASP.NET outputs very bad non-compliant HTML code, with depreciated inline attributes (such as style attributes for tables etc.)

Much of these auto-inserted attributes cannot be rectified, except for an expensive 3rd party plug-in, or you wait until wait until ASP.NET 2 is out in about 6 months I think.

But you can control most stuff with CSS, if you can keep up with ASP.NET's IDs and class names.

The next sentence is true. The previous sentence is false. Discuss...