View Full Version : load a css style sheet inside of a template
control1110
11-07-2007, 01:55 AM
How do I load a css style sheet inside my template?
can I do
<head>
<link href="stylesheet url here" rel="stylesheet" type="text/css" />
</head>
inside the template or is there another way to do it?
Freesteyelz
11-07-2007, 02:17 AM
You could but then you'll have two <head> tags when you load that page. If you're concerned about the server load then don't worry; CSS is very light. I would just place the link in your headerinclude template.
control1110
11-07-2007, 03:06 AM
do you mean just place
<link href="stylesheet url here" rel="stylesheet" type="text/css" />
in the headerinclude template?
Freesteyelz
11-07-2007, 03:31 AM
I'll probably use this instead:
<style type="text/css">
@import url('/path_to_script.css');
</style>
Though, the code you have will work too.
control1110
11-07-2007, 04:17 AM
thank you
ragtek
11-07-2007, 05:29 AM
I'll probably use this instead:
<style type="text/css">
@import url('/path_to_script.css');
</style>
Though, the code you have will work too.
isn't it so, that @import is not working in ie???
ive read it here: http://www.webdevout.net/css-hacks#in_css-import_media
Freesteyelz
11-07-2007, 05:49 AM
In all of my tests and applications it worked. These were dated back from 2005 using various browsers including IE versions 5.0 and 5.5. Sites such as CSS Zen Garden and other CSS devoted sites use it too. :)
ragtek
11-07-2007, 06:04 AM
ok thx
i was confused because of this article
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.