I have a website which was developed using .Net Framework 3.5 and all the CSS is spot on. However, when I publish the website to the test server, the CSS formating used against things such as table data tags, the formatting is not working.
Both the test server and development server are Server 2003 and IIS6.
Is there something that needs to be done to get the CSS formatting working again?
Did you have previous version of your site on the test server?
What I found when I publish my site to test it on the internet even after a publish from Visual Studio because your computer keeps a cached copy it doesnt update fully
Try clearing your internet history and cookies and everything and then navigate to the test site
The web application is on my employers intranet. Viewing the web application on the test server, which is running horrible IE6 (but lets ignore IE6 because I know it has its own problems), viewing the web applicaton from different machines running IE8 and
others doing the same for me, the CSS is lost.
When you right click in Visual Studio 2008 on the project there is an option called publish. This comes up with a box for you to type in the server name and virtual folder name to send the web application to.
Sorry, I do not follow what is meant by checking the properties of the CSS in solution explorer?
access your site in firefox check the css path through firebug . If not coming properly then change path style like ../ or ~/ or /css/stylesheet.css like that if not coming then try to download your css like
www.yourwebsite.com/css/StyleSheet.css then it will be download otherwise there is no css file in ur production server.
Sorry, I do not follow what is meant by checking the properties of the CSS in solution explorer?
i dont know how VS 2008 is, but in VS 2010 there is a solution explorer in which you see your project with all the files and subfolders etc.
if you find you css file in there, then right click the css file and choose the properties option (make sure your not running the application in VS when you do this)
AndyMoireASP
Member
53 Points
742 Posts
CSS not working in production
Nov 16, 2012 11:09 AM|LINK
Hi
I have a website which was developed using .Net Framework 3.5 and all the CSS is spot on. However, when I publish the website to the test server, the CSS formating used against things such as table data tags, the formatting is not working.
Both the test server and development server are Server 2003 and IIS6.
Is there something that needs to be done to get the CSS formatting working again?
archie8
Member
428 Points
308 Posts
Re: CSS not working in production
Nov 16, 2012 11:22 AM|LINK
make sure your css is included when you publish. to make sure its included
right click on your css file and choose properties.
then there should be an option to "copy to output directory"
make sure this is set to "copy always"
hope that helps
AndyMoireASP
Member
53 Points
742 Posts
Re: CSS not working in production
Nov 16, 2012 11:26 AM|LINK
Hi
The CSS is there and I use the publish option in VS 2008.
PashBash
Member
371 Points
81 Posts
Re: CSS not working in production
Nov 16, 2012 11:36 AM|LINK
Did you have previous version of your site on the test server?
What I found when I publish my site to test it on the internet even after a publish from Visual Studio because your computer keeps a cached copy it doesnt update fully
Try clearing your internet history and cookies and everything and then navigate to the test site
archie8
Member
428 Points
308 Posts
Re: CSS not working in production
Nov 16, 2012 11:52 AM|LINK
sorry im not familiar with VS 2008, but did you check the properties of the css file in solution explorer?
AndyMoireASP
Member
53 Points
742 Posts
Re: CSS not working in production
Nov 16, 2012 12:01 PM|LINK
Hi to everyone
The web application is on my employers intranet. Viewing the web application on the test server, which is running horrible IE6 (but lets ignore IE6 because I know it has its own problems), viewing the web applicaton from different machines running IE8 and others doing the same for me, the CSS is lost.
When you right click in Visual Studio 2008 on the project there is an option called publish. This comes up with a box for you to type in the server name and virtual folder name to send the web application to.
Sorry, I do not follow what is meant by checking the properties of the CSS in solution explorer?
oned_gk
All-Star
31766 Points
6492 Posts
Re: CSS not working in production
Nov 16, 2012 12:03 PM|LINK
venkimca
Member
282 Points
241 Posts
Re: CSS not working in production
Nov 16, 2012 12:16 PM|LINK
access your site in firefox check the css path through firebug . If not coming properly then change path style like ../ or ~/ or /css/stylesheet.css like that if not coming then try to download your css like www.yourwebsite.com/css/StyleSheet.css then it will be download otherwise there is no css file in ur production server.
AndyMoireASP
Member
53 Points
742 Posts
Re: CSS not working in production
Nov 16, 2012 12:45 PM|LINK
Thanks, I will get the sys admin to look at this, but if the path is correct is there anything else worth looking at as possible causes
archie8
Member
428 Points
308 Posts
Re: CSS not working in production
Nov 16, 2012 01:17 PM|LINK
i dont know how VS 2008 is, but in VS 2010 there is a solution explorer in which you see your project with all the files and subfolders etc.
if you find you css file in there, then right click the css file and choose the properties option (make sure your not running the application in VS when you do this)