Skip to main content
2 of 2
improved spelling, formatting, and punctuation; removed thanks
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

How to add dynamic created css using drupal_add_css

I am trying to add a file which is located in sites/default/files/color/theme-768/color.css using drupal_add_css().

I have tried drupal_add_css($filepath), but it doesn't work. I tried putting it in template.php and hook_init(), but still it isn't included in the style tags of head section or anywhere.

How I do include a CSS file like this using drupal_add_css()?

Ram
  • 1.3k
  • 15
  • 37