PDA

View Full Version : CSS <link> hack


AxelF
06-02-2004, 12:18 PM
Hi guys.
On our board at cableforum.co.uk we need a way to replace the CSS styles with an alternate version.
Instead of using
<style type="text/css">
/*
CSS here
*/
</style>

We need to use
<link href="path/to/style.css" type="text/css" />

This is quite important for us because half the page seems to be CSS and our bandwidth usage is getting silly. (The file method would mean it is cached in the browser, making the site faster too)
I know that we can use an @import version now but this will not work properly in all browsers.

Any ideas?

Just one other note, there seems to be an option to store CSS as file in the Admin CP but it doesn't appear to make any difference to how it's included in the pages?

Thanks in advance to anyone who can help. :)

Zachery
06-02-2004, 01:52 PM
vBulletin already has this function built in, did you make sure to CHMOD the file before enabling this option?

AxelF
06-02-2004, 04:23 PM
Ok, it was already enabled but something must have gone wrong with it when it was first set because I disabled then re-enabled it and now it works fine.
Thanks. :)

Zachery
06-02-2004, 04:26 PM
IF the folder is not chmoded instead of breaking vBulletin just keeps the CSS inline for your own benifit ;)

IF you resave the option after youve chmoded the folder all will be good :D