Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CSS not being honored
Message
From
09/11/2009 10:39:34
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01433817
Message ID:
01433841
Views:
36
>>Hello All,
>>
>>I have a new web application that I have been trying to get published. Much of the style and position have been set in a css file in a directory off the root of the web app called 'CSS'. This app works fine in development but onced published it will not honor the CSS at all. I have verified the permisions on the CSS directory and there is no problem with that. I also even moved the css into the master page itself as embedded css but still with no luck. Essentially the images and styles are not being set at all.
>>
>>I am now at a complete loss for what to experiment with in order to uncover the problem.
>>This is being published temporarily at:
>>www.btsapps.com/Sandbox/MSA
>
>It looks like the image links in the CSS are broken. Ex. /Images/logo4.gif, /Images/menu.gif, and /Images/masterBackground.jpg all return a 404 error.
>
>They're relative from the root because of the first slash /, so that may be why.

Hi Paul,

This is currently published as a root level application as it is a test site behind my web site. I originally did not have the first slash on the images and I had added and removed quotes around the url portion to no avail.
Also there is some color items that are not applying either. Could it also be the url to the css file is not right within the aspx page because of not being a root level application? I have this:
<link href="~/CSS/style.css" rel="stylesheet" type="text/css" />
>

But it is actually behind the other web app so maybe it should be
"/Sandbox/MSA/CSS/style.css"
I am a bit confused now.
the root directory of the is web app is set as a virtual (application) directory. Where does this refer to:
"/CSS/style.css"
or this
"CSS/style.css
or this
"~/CSS/style.css"

Thanks
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform