I've started developing a site locally and I want to show the end user what it going to look like. So I've uploaded everything onto my web host but the css links aren't working.
I've tried messing around with the directory path but I can't get them to show (although they all work on a local install). Has anybody seen this sort of thing before. The URL is badappledesign.co.uk/rsfleetcms
I would use the following for both local and remote and this would apply to all references, including your images. This will ensure everything works when you ahve sub level or evern sub sub level pages.
Originally the all the css links were in the format of <link href="/css/style.css" rel="stylesheet" type="text/css" />
I changed it on the live site because I was trying to get the CSS to apply so I went from /css to css to ../css and none of them worked. I've changed back to /css but still the styling isn't being applied.
How'd you mean though that the page has been published without a template? In the Umbraco content node it says it has!
Usually when a CSS is not being referenced correctly then the page will still display but with no styling, kinda like plain text. When i visited your site is was a blank page.
I'm pretty sure the CSS is bring refernece correclty, when you view source in CHrome I can click on the CSS links and it works, always good sign.
Have you made sure the master pages/templates being used by the page itself has been copied up? It does not look to me like the images etc are there...
The page isn't blank (although it looks it) if you scroll down the page you'll see the, unformatted, text.
After looking at the source in chrome I can see that the css is looking in the wrong folder. Currently it's trying to find css/scripts/images on the root folder (badappledesign.co.uk/) and they don't exist there, where it should be looking in badappledesign.co.uk/rsfleetcms/.
Think we've both sorts seen the problem! I don't have direct control over the IIS but I can make a request to the people that do. What should I be telling em?
I did indeedy that again points to the root folder of the site.
As this site is heavily in development and when it's eventually put live it will exist in the root of the directory I might actually use /rsfleetcms/css for the link reference.
Are you trying to run this site in a subfolder of the main site? If so, you'd run into problems as "/" would refer to the root of the main site - not the subfolder 'root'.
Options:
Create a new site in IIS and point a dedicated subdomain to it (e.g. test.badappledesign.co.uk).
Use a subdomain that points to your main instance (badappledesign.co.uk). This option would some creative redirecting (IIS Redirector).
Add a tag to the HTML (http://www.w3schools.com/tags/tag_base.asp).
Styling 'lost' in a live environment
Hi Folks,
I've started developing a site locally and I want to show the end user what it going to look like. So I've uploaded everything onto my web host but the css links aren't working.
I've tried messing around with the directory path but I can't get them to show (although they all work on a local install). Has anybody seen this sort of thing before. The URL is badappledesign.co.uk/rsfleetcms
Thanks in advance,
Craig
The problem is this...
<link href="../css/style.css" rel="stylesheet" type="text/css" />
I would use the following for both local and remote and this would apply to all references, including your images. This will ensure everything works when you ahve sub level or evern sub sub level pages.
<link href="/css/style.css" rel="stylesheet" type="text/css" />
It could also be that the pages has been published without a template selected...
Hope this helps,
S
Hi Stephen,
Originally the all the css links were in the format of <link href="/css/style.css" rel="stylesheet" type="text/css" />
I changed it on the live site because I was trying to get the CSS to apply so I went from /css to css to ../css and none of them worked. I've changed back to /css but still the styling isn't being applied.
How'd you mean though that the page has been published without a template? In the Umbraco content node it says it has!
Thanks,
Craig
Usually when a CSS is not being referenced correctly then the page will still display but with no styling, kinda like plain text. When i visited your site is was a blank page.
I'm pretty sure the CSS is bring refernece correclty, when you view source in CHrome I can click on the CSS links and it works, always good sign.
http://badappledesign.co.uk/css/style.css
Have you made sure the master pages/templates being used by the page itself has been copied up? It does not look to me like the images etc are there...
http://badappledesign.co.uk/images/rslogo-white.png - This is reference in the code but it not on the site...
well at least not at that URL...
http://badappledesign.co.uk/rsfleetcms/images/search_bttn.png - This works.
Stephen
I think see the problem...your site is a subfolder of the main site...do you have control over the IIS?
or you could try <link href="css/style.css" rel="stylesheet" type="text/css" />
S
The page isn't blank (although it looks it) if you scroll down the page you'll see the, unformatted, text.
After looking at the source in chrome I can see that the css is looking in the wrong folder. Currently it's trying to find css/scripts/images on the root folder (badappledesign.co.uk/) and they don't exist there, where it should be looking in badappledesign.co.uk/rsfleetcms/.
Think we've both sorts seen the problem! I don't have direct control over the IIS but I can make a request to the people that do. What should I be telling em?
Thanks again!
Craig
Did you try using
<link href="css/style.css" rel="stylesheet" type="text/css" />
S
I did indeedy that again points to the root folder of the site.
As this site is heavily in development and when it's eventually put live it will exist in the root of the directory I might actually use /rsfleetcms/css for the link reference.
Thanks,
Craig
Have you tried this?
<link href="~/css/style.css" rel="stylesheet" type="text/css" />
Hi Arie,
Yes I've tried that one....with no luck
Are you trying to run this site in a subfolder of the main site? If so, you'd run into problems as "/" would refer to the root of the main site - not the subfolder 'root'.
Options:
is working on a reply...