I'm trying to add localised styles (e.g. template from www.oswd.org containing html and css files) inside a block embedded in a region within a parent theme such as marinelli. So I guess you might describe this as a "nested theme" (a custom theme within a theme).

I can create a block and include the html content (body only) inside the block which is then placed in a region. That works o.k. but of course the style sheet is not linked to the included html content.

I need a reminder of how to add links to custom css files in the header.

Do I have to use drupal_add_css and if so where do I add this so that the embedded html refers to it?

Do I have to add the path to the custom css in the marinelli theme info file? I've tried that but for some reason the css file does not show up in source view.

I just need a few pointers on how to add custom internal css (in a region) to an existing parent theme.

Comments

nevets’s picture

Why not simply target css using the block id?

d_l’s picture

I'm not sure what was meant by "target css using block id". My div had an id="container".

I solved my local css problem using an approach I remembered from an earlier thread .. by adding a link after print $styles in marinelli theme .. html.tpl.php.

The only disadvantage is that if the theme is changed I have to remember to modify html.tpl.php .. ..
and I guess that the path to style.css could be shorter .. using PHP_SELF ?

	<head profile="<?php print $grddl_profile; ?>"><!--start head section-->
	  <?php print $head; ?>
	  <title><?php print $head_title; ?></title>
	  <?php print $styles; ?>

<!-- ============================================== -->

<?php echo
'<link href="http://localhost:8080/drupal-7.8/sites/all/files/includes/templates/orange/css/style.css" rel="stylesheet" type="text/css" />'; 
?>

<!-- ============================================== -->

	  <?php print $scripts; ?>