Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Tim99 on
Hello,
I created a PHP-Template based theme and now I want to theme a certain module: The Calendar. Inside the module there is a calendar.css. I thought, I just had to put a calendar.css inside my theme folder and it would override the one from the module folder. But that was not the case. Any ideas how to achieve that?
Comments
Your themes' style sheet --
Your themes' style sheet -- style.css -- is the very last style sheet that drupal reads. Make sure that the code you want displayed is in that document.
----------------------------------------------------------------------
http://www.bwv810.com/
I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу общаться на русском языке.
Hm, then my style.css would
Hm, then my style.css would be really bloated. I'd rather like to have several smaller files. Perhaps I should link the calendar.css in my page.tpl.php?
Bloat is a human concern;
Bloat is a human concern; the server reading your CSS sees a bunch of letters and numbers. Two thousand more will make no difference, as long as those charcters are properly configured and recorded.
If you think you might have trouble keeping everything straight in style.css, that is another issue entirely.
I am a big fan of not linking things in the templates if they do not need to be linked.
Once you have everything set up, go to site configuration, performance, and enable CSS compression. Your site will fly.
----------------------------------------------------------------------
http://www.bwv810.com/
I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу общаться на русском языке.
There is better way to do it
You can do that.
However, it is recommended to put something like
at the end of theme template.php. This will enable Drupal to handle your additional custom css files automatically.
--
Lupein
Drupal themes - themeartists.com
Drupal 6 way
In Drupal 6, the correct way to do this is documented at http://drupal.org/node/263967
Hope this helps.
Jeff
________
Drupal Development,
http://marmaladesoul.com
_________
http://marmaladesoul.com