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

bwv’s picture

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. / Я могу общаться на русском языке.

----------------------------------------------------------------------
http://classicvinyl.com

Tim99’s picture

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?

bwv’s picture

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. / Я могу общаться на русском языке.

----------------------------------------------------------------------
http://classicvinyl.com

artist.lupein’s picture

You can do that.

However, it is recommended to put something like

drupal_add_css(drupal_get_path('theme', 'myTheme') . '/calendar.css', 'theme');

at the end of theme template.php. This will enable Drupal to handle your additional custom css files automatically.

--
Lupein
Drupal themes - themeartists.com

jeff h’s picture

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