Wednesday, June 10, 2020

How to add css inline in drupal 7



1. if you're calling drupal_add_css() from your own module (in my case, named custom.module) :-


drupal_add_css(drupal_get_path('module', 'custom') . '/css/custom.css', array('group' => CSS_DEFAULT, 'every_page' => TRUE));


2. if you're add Inline style :-

drupal_add_css('#edit-overlay-control {display:none;}', array('type' => 'inline'));

No comments:

Post a Comment

If you have any problem please let me know.