Turning off "Auto Inline CSS" in VS 2008

smmelton

New member
Joined
Feb 20, 2008
Messages
4
Programming Experience
1-3
Recently our company upgraded from VS 05 to 2008. So far I like it. But any time I create a new page and adjust things like table widths it auto assigns inline CSS styles instead of just assigning a width to each cell. Is there a way to turn that off? It's incredibly annoying. I've played with Tools>Options>HTML Designer but it doesn't help.
 
Inline CSS (Styles property) is applied if you set the width in Styles dialog, but not if you set Width property from what I see.
I'm more in favour of site wide linked stylesheets or head styles if one absolutely need local page overrides, so the addition of a CSS editor I think is really nice.
 
That's the thing, all of our pages use master pages that are linked to our CSS file, but any time I create new pages in 08 it ignores that existing link, even if I reference the CSS sheet at the top of every page it still will create styles on certain things. For instance, if I expand a table column, it'll create a style at the top of that page and reference the style with <td style="style1">. I have no idea why it won't just set the width property on every <td> like 05 did for me rather than putting in a style every time.

Sorry for not being clearer before.
 
You can use the new CSS editor/manager to add the new style directive to the existing or new stylesheet.
Exactly what you mean by "if I expand a table column, it'll create a style" I don't understand.
 
If I grab a table column in design view and stretch it wider, I'd rather have it say <td width="500px"> than it saying <td style="style1"> and have a style that is set to 500px at the top. That's what it did in 05.
 
Aha, see it now. You can configure this in Options, Html Designer, CSS. Choose CSS (classes) or CSS (inline styles) for the different categories.
 
Back
Top