External CSS Stylesheets?

For requests for help from CG administrators, Wranglers, and experienced CG members. Please read the FAQ before posting. Also look at CG Wiki for tutorials and how-tos written by other CG webtoonists.
Post Reply
User avatar
Haresy
Regular Poster
Posts: 29
Joined: Thu Sep 01, 2005 4:33 am
Location: Saline, Michigan
Contact:

External CSS Stylesheets?

Post 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?

User avatar
STrRedWolf
Confuzzled CG Admin
Confuzzled CG Admin
Posts: 2580
Joined: Fri Jan 01, 1999 4:00 pm
Location: undef;
Contact:

Re: External CSS Stylesheets?

Post 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.
Kelly "STrRedWolf" Price
Admin, Comic Genesis
Artist/Writer, Stalag '99 (WolfSkunks and Drygers, oh my!)
I NEED MORE TIME, CAPTIN!

User avatar
Dr Neo Lao
Cartoon Hero
Posts: 2397
Joined: Wed Oct 18, 2006 5:21 am
Location: Australia

Re: External CSS Stylesheets?

Post 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).

User avatar
Haresy
Regular Poster
Posts: 29
Joined: Thu Sep 01, 2005 4:33 am
Location: Saline, Michigan
Contact:

Re: External CSS Stylesheets? [working!]

Post 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.

Post Reply