Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 10, 2008 11:00 AM by Brian27
Feb 09, 2008 08:10 PM|LINK
I'm using an external CSS Stylesheet in my web project but in Visual Studio, the styles do not render. Is there a preference to allow VS 2005 to display the styles in Design View, so I can see what I'm doing and not have to keep running the web application
to see the output.
Also with the external CCS Style sheet. It works if I manually assign a class to something but is there a way to select the style from a list. How do I see all the styles in my external sheet and select one to apply to an element. Dreamweaver has it in the
properties toolbar but I can't find it in VS. Thanks
Feb 09, 2008 11:10 PM|LINK
I dont think everytime you change a style inside the stylesheet to stop the debugger and re-run your application. When you change a style in the css file, try to save the file using (CTR+S) and then refresh the browser, in this way the styles are applied
directly because the new stylesheet will be loaded instead of the old one.
Feb 10, 2008 01:11 AM|LINK
I don't believe there is an option in Visual Studio to render external style sheets in Design view. You can try to set the CssClass property in the control to the style class and see if that works.
You should not have to stop the debugger and restart it when you make a change to the style sheet like Haissam mentioned above. HTML and CSS can be modified while debugging since they are not compiled into the assembly. Just do a refresh on the page after
you've modified the style sheet and the change should appear.
Hope this helps. Please let us know if you have any other questions/issues.
Feb 10, 2008 11:00 AM|LINK
Frustrating, isn't it? VS 2005's designer is useful for absolute positioning, but that's not what you're usually after using CSS. Depending on the degree to which you wish to create standards based websites, you should look into VS 2008 and Expression
Web. There's an free express version of VS 2008, and trial version of Expression (hope that's not confusing).
While using VS 2003/5 I gave up trying to use the designer view to get what I wanted - if it showed things the way I wanted, it trashed the HTML. Expression Web does a much better job of working with CSS, and VS 2008 is better than it was - but still can
mess things up, trying to be helpful. I always use the browser view to check things as I go along, then check the code. the idea of using a designer is nice, but it seems to be at cross purposes with the idea of creating layouts that will render well (if
not the same), in various configurations of browser, display and settings.
Hope it helps. BRN..