Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-05 08:44:41

Souljacker
Member
From: Terra Brasilis
Registered: 2005-06-20
Posts: 47
Website

Importing external CSS through TXP CSS

I’m experiencing a strange issue here.

When I turn messy URL mode off , whenever I access a link such as mysite/section/id everything BUT the CSS fomentation is displayed.

I’ve figured out that’s because I’m managing my CSS externally to TXP, thus, when it load something from such directory the css patch in the import rule doesn’t work.

Is there any way I can put an import rule like

@import url(css/index.css);

in TXP’s style manager?

Offline

#2 2005-12-05 13:12:01

edburdo
Member
Registered: 2004-09-20
Posts: 79
Website

Re: Importing external CSS through TXP CSS

Try this:

@import url(/css/index.css);

You need to use an absolute URL since the relative base changes depending on what section/category your viewing. I had to do that with my website to make a external (non TXP) css file work.

Having the external CSS files eliminates a hit on the DB, which for high-traffic sites, can save you a smidgeon of time.


Eric

Offline

#3 2005-12-06 17:29:01

Souljacker
Member
From: Terra Brasilis
Registered: 2005-06-20
Posts: 47
Website

Re: Importing external CSS through TXP CSS

Thanks edburdo, worked beautifully.

Offline

Board footer

Powered by FluxBB