By -Anti- on
I've searched and read lots of stuff, but I can't get a straight, layman's answer.
I'm *not* a themer. I've downloaded a theme, and there are lots of styles missing.
For instance, the styles for .book_printer a and .book_add_child a
Rather than add these styles to style.css, I want to have a separate stylesheet called
custom.css, which I've created and placed in the theme folder. However, I don't know
how to declare it in D6?
Thanks.
Comments
Create your stylesheet and
Create your stylesheet and place it in the theme directory you are currently using.
Edit or create template.php and insert the following:
RE: http://api.drupal.org/api/function/drupal_add_css/6
Thanks for the reply. Yes,
Thanks for the reply.
Yes, that page you linked to was one of the many I referred to when I said I couldn't find a layman's answer.
If you could help me a little more, I'd be very grateful:
It seems to me that in template.php, there are nothing but functions.
So putting exactly: drupal_add_css('custom.css'); probably won't do anything or cause an error?
So do I need to put something like:
Doesn't any of this stuff matter?
$path = NULL, $type = 'module', $media = 'all', $preprocess = TRUE
And also what do I do if I want to add another additional stylesheet in the future?
Thanks so much for any further clarification.
can you add...
can you just add
<style> @import "<?php print $base_path ?>/themes/themename/custom.css"; </style>to the head of page.tpl.php?
~silverwing
_____________________________________________
Land of Midnight | MisguidedThoughts | showcaseCMS
can you just add...
> can you just add
I don't know... can I? ;)
Is there any advantage of that, over using the drupal_add_css method?
:)
Yes you can. :)
I don't know.
~silverwing - not a php geek
_____________________________________________
Land of Midnight | MisguidedThoughts | showcaseCMS
Append to template.php
Append to template.php (before the php end tag, if any)
The advantage to appending the template.php file is that you are centrally adding css files to your theme. So if there any filename changes or locations, you change it once instead of many times. Oppose to adding it to page.tpl.php, and if you create another page-type.tpl.php, you will have to add it there too.
Add additional files (including javascript)
Another way to add css, is to edit the .info file.
Thank you both for your
Thank you both for your help.
I'm sure this thread will be useful for noobs.
subscribing...
subscribing...