Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 25, 2009 01:35 PM by chipwitch
Mar 19, 2009 02:26 PM|LINK
Anyone ever run into styles not apply to a master page app when run, yet they apply in VS design mode? Even when in design mode of the content pages, VS applies the style. But as soon as you run the app, IE won't apply the styles. And 'yes'... I've hit
<ctrl>+r to force a reload of the page in IE.
I dragged and dropped the style sheet to the master page in design mode. Then, in source mode, I edit the link tag's href to be root relative. Still no joy.
Mar 19, 2009 02:39 PM|LINK
Mar 19, 2009 02:40 PM|LINK
Mar 19, 2009 02:41 PM|LINK
this one wont work <link
if its not running on the server "~/" insted do one of the following href="Stylesheet.css" or make it run on server <link rel="~/Stylesheet" type="text/css" href="~/stylesheet.css" runat="server" id="style" />
hope it helps
Please don't forget to mark as "Answered". Thanks
Mar 19, 2009 03:10 PM|LINK
You can also solve the problem with this aproach
Mar 19, 2009 03:33 PM|LINK
First, thanks to all for the suggestions. :-)
Second, I noticed a typo in my original post. To accurately reflect the code in my master page, the link tag should have read:
The tilda and slash in rel="~/stylesheet" was not in my mark up.
jamesqua, I tried removing the ~/ from the href attribute, but it didn't help. I also checked the physical folder and found that the my stylesheet, master page and the content page ALL reside in the same folder. I tried setting the href to the absolute
address as you suggested and this works fine. Obviously, that isn't an acceptable solution and I'm unable to find the problem. Is it possible that it has to do with the fact this master page is a login app? The content page being loaded is a protected page
so naturally the app defaults to login.aspx. Even the protected page is in the same folder as the rest of the files.
Venkat, the "../" notation didn't work.
Stojan, I tried your suggestion as well. Likewise, it didn't work.
So, jamesqua, now where should I look?
Mar 19, 2009 03:44 PM|LINK
Tried it... no luck
and I'm getting the correct absolute path (it matches the physical folder of the css file)
Mar 19, 2009 03:56 PM|LINK
When you navigate to the absolute path in the browser does the css file show up?
Mar 19, 2009 04:41 PM|LINK
Hmm wiered! Try to browse the css file in your browser as was suggested and try also to run the page in other browser like FF to see does the styles are applied if so ... browser issue(settings could disable styles).
Hope it helps
Provided by: www.snb-bg.com
Mar 20, 2009 06:21 AM|LINK
Just look in to it may be it will be helpful for you.
<link href="../App_Themes/index_sytle.css" rel="stylesheet" type="text/css" />