Page 1 of 1

External CSS Stylesheets?

Posted: Sun Dec 06, 2009 8:06 am
by Haresy
My site is build using XHTML and CSS; currently all the CSS is contained within the HTML.

As the site grows and I add more pages beyond dailytemplate and indextemplate, I'd love to be able to link to an external stylesheet. The main reason for this is so I can make changes to ONE file instead of SEVERAL when I update the site.

Is this possible?

Re: External CSS Stylesheets?

Posted: Mon Dec 07, 2009 7:21 pm
by STrRedWolf
Yes. Place the CSS in /workspace/webpages, and it'll be copied over to the visibile "root" of your site.

If you put, say, main.css in /workspace/webpages, it'll show to the browsers as /main.css; so in your HTML, use "/main.css" for the source to pull the CSS.

Re: External CSS Stylesheets?

Posted: Thu Dec 10, 2009 5:45 am
by Dr Neo Lao
Just remember that leading slash! Your css links ought to be src="/name.css" and not src="name.css" (the reason for this is so that you can use the same link from all pages and have the css found).

Re: External CSS Stylesheets? [working!]

Posted: Sun Jan 31, 2010 3:03 pm
by Haresy
Sorry for the delay; been pulled into too many other projects...
Modified the code per your instructions; works like a charm!

Thanks for the help.