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
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.
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.
- Jesse
Jesse Williams
Please mark 'Answered' if my post was able to assist you.
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..
CSSDesign view
Marked as answer by Vince Xu - MSFT on Feb 14, 2008 09:10 AM
riprod
Member
12 Points
102 Posts
Visual Studio Newbee... CSS Style sheets don't render in VS 2005 & External CSS
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
Haissam
All-Star
37421 Points
5632 Posts
Re: Visual Studio Newbee... CSS Style sheets don't render in VS 2005 & External CSS
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.
HC
MCAD.NET
| Blog |
psuphish05
Participant
1381 Points
278 Posts
Re: Visual Studio Newbee... CSS Style sheets don't render in VS 2005 & External CSS
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.
- Jesse
Please mark 'Answered' if my post was able to assist you.
Brian27
Contributor
2296 Points
527 Posts
Re: Visual Studio Newbee... CSS Style sheets don't render in VS 2005 & External CSS
Feb 10, 2008 11:00 AM|LINK
Hi,
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..
CSS Design view