In my experience, VS will only override the CSS for controls if you specify
the various format properties (and again, this is really an ASP.NET thing,
not a VS thing).  If you just use CssClass (as in Item-CssClass,
Header-CssClass, etc) you shouldn't have a problem.

The HTML mangling can be a real problem.  I only use the designer for the
initial layout of the form in VS 2003 and then make all my changes in source
view.  VS 2005 is a big improvement over VS 2003 in many ways including the
handing of switching between design and source views.

Another problem you may face is that ASP.NET tends to use tables to render
controls when you might wish it would use lists instead.  You would have to
write your own server controls in these cases which probably isn't worth the
effort.

I am nowhere good enough with CSS to do something like CSS Zen Garden but I
don't see why VS would make that any more difficult.  It is the CSS learning
curve that I find difficult...although I am starting to get the hang of it.

VS2005 also allows for 'themes' which are essentially CSS definitions for
server controls.

Fortunately I tend to work on relatively small projects so moving to
VS2005/ASP.NET 2.0 isn't quite as painful as it would be if you were going
to convert a large project.

Chris

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Squibb, Brian
Sent: Monday, November 07, 2005 8:55 AM
To: Chris Morse; css-d@lists.css-discuss.org
Subject: Re: [css-d] ASP.NET/CSS

Most of my output is through datagrids-(

 VS overrides the CSS for controls - and then it mangles the HTML when you
open the designer:-(

Have you tried changing the look and feel of a site ala css Zen Garden?
Using CSS for layout is decidedly difficult!

I hope VS2005 is better - but it is unlikely that I will get this into
production for another year or so.



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Chris Morse
Sent: 07 November 2005 13:09
To: css-d@lists.css-discuss.org
Subject: Re: [css-d] ASP.NET/CSS


Brian,

I am not sure what you mean by 'site level CSS support' but I develop sites
with Visual Studio all the time and use CSS rather extensively.  Visual
Studio is simply a tool to create ASP.NET pages which are a combination of
server controls and HTML tags.

- You can include <link> tags in the page headers which is the same thing
you would do to include CSS files in a static site.  

- You can specify CSS classes for server controls by using the CssClass
property.

- ASP.NET Panel controls generate HTML DIVs and Label controls generate HTML
SPANs so that is no different from static HTML.

- You can use HTML tags inline with server controls when you have no need to
reference or manipulate the particular object.

The only issue I have had with ASP.NET is that server control IDs are
changed by the ASP.NET runtime based on their context (inside a DataGrid
control for example) to maintain uniqueness so you can't always rely on the
ID you specify being the ID in the generated code.  That being said, the IDs
for HTML tags, which would most likely be the IDs you would use in your CSS
for the overall structure of your site, are not modified by ASP.NET

Also, Visual Studio can mangle your HTML a bit but that has been fixed in
Visual Studio 2005 so that is no longer an issue.  It wasn't so much a CSS
issue anyway but rather DOCTYPE issue as VS could mess up your XHTML.

In VS 2005 you have Master Pages which make using CSS even easier and by
default new pages are created as XHTML Transitional.  I believe you
configure VS 2005 to default to any DOCTYPE you desire however.

HTH,
Chris

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Squibb, Brian
Sent: Monday, November 07, 2005 7:15 AM
To: Chris McLay
Cc: CSS-D
Subject: Re: [css-d] ASP.NET/CSS

[CTM] <snip>

With ASP combining the two was not a problem, however this has all changed
with ASP.NET. The focus here is to use the Visual Studio design, which was
fine for simple pages but useless for a site as there seems to be no
intuitive site level CSS support (although there is some control level
fudging)

[CTM] </snip>

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to