I would like to have additional line in the head section of main page
<style type=„text/css“ media=„handhel­d“>@import „additional-css-vidible-only-on-mainpage.css“;</sty­le>

Any suggestion how can I do it?

Comments

tsega’s picture

Instead of adding a new file why not adding your css into an already existing css file. For example if you are using the default garland you can add your own css styles to the file indicated by this link

@import "/yoursite/themes/garland/style.css";

. Just open the file and add your styles to the end of the document but make sure that the names do not conflict with already existing ones.

tsega’s picture

Sorry I didn't notice the media type and I really don't know how to do that. I have tried what I have suggested and it works. I guess there should be a way to add custom styles sheets(different from themes) to a Drupal website.

designwork’s picture

Hi newd,

it depends your theme. But go to your template.php or our page.tpl.php and import this css with the others like:

  drupal_add_css($vars['directory'] .'/style-fotos.css', 'theme', 'all');
        $vars['css'] = drupal_add_css($vars['directory'] .'/print.css', 'theme', 'print');
        $vars['styles'] = drupal_get_css();
      } 

Dirk

tsega’s picture

Hey check out the Alter CSS module if you haven't cause it seems like it does something similar to what you are looking for. Here is the link. http://drupal.org/project/alter_css . Check out Node Style as well. http://drupal.org/project/node_style