0

My stylesheet is mentioned in my .info file, but it's not adding it to the page source and using it. The only style I have in Styles.css is body {background:#444}. I've tried clearing the site's cache as well as my browser's. CSS compression is off. Any ideas?

It's a theme I made from scratch.

info file:

name = PBmedia 14
description = The Site Theme
core = 7.x
engine = phptemplate



; Regions
; --------------------------------
regions[header] = Header
regions[content] = Content
regions[footer] = Footer



; Stylesheets
; --------------------------------
stylesheets[all] [] = html5reset-1.6.1.css
stylesheets[all] [] = styles.css

html.tpl.php

<!DOCTYPE html />


<head profile="<?php print $grddl_profile; ?>">
  <?php print $head; ?>
  <title><?php print $head_title; ?></title>
  <?php print $styles; ?>
  <?php print $scripts; ?>
</head>
<body class="<?php print $classes; ?>" <?php print $attributes;?>>
  <div id="skip-link">
    <a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?></a>
  </div>
  <?php print $page_top; ?>
  <?php print $page; ?>
  <?php print $page_bottom; ?>
</body>
</html>

page.tpl.php

<div id="page-wrapper"><div id="page">

<header id="header">

  <?php if ($main_menu): ?>
  <nav id="navigation">
    <?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t(''))); ?>
  </nav><!-- #navigation -->
  <?php endif; ?>

  <?php print render($page['header']); ?>
</header> <!-- #header -->





<?php print $messages; ?>

<div id="main-wrapper"><div id="main" class="clearfix">

  <div id="content">
  <div class="section">

    <?php print render($title_prefix); ?>
    <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
    <?php print render($title_suffix); ?>
    <?php if ($tabs): ?><div class="tabs"><?php print render($tabs); ?></div><?php endif; ?>
    <?php print render($page['help']); ?>
    <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
    <?php print render($page['content']); ?>
    <?php print $feed_icons; ?>
  </div><!-- /.section -->
  </div> <!-- /#content -->


</div></div> <!-- /#main, /#main-wrapper -->

<footer id="footer">
  <?php print render($page['footer']); ?>
</footer><!-- #footer -->

</div></div> <!-- /#page, /#page-wrapper -->
9
  • Can you give more information on your theme's configuration?
    – Tritof
    Commented Feb 4, 2014 at 18:30
  • If you are actually saying stylesheet[all][].... that is probably the problem because it should be stylesheets[all][].... eg plural
    – Jimajamma
    Commented Feb 4, 2014 at 19:02
  • Ah right! I made them plural, cleared the caches and no change...
    – PatBranch
    Commented Feb 4, 2014 at 19:07
  • Is styles.css in the root of the theme, or is it in a CSS folder? Commented Feb 4, 2014 at 19:14
  • 3
    In your code above you have an extra space in between stylesheets[all] and []. Commented Feb 4, 2014 at 19:40

1 Answer 1

2

There should not be a space after "[all]" ...
Change:
stylesheets[all] [] = styles.css
to:
stylesheets[all][] = styles.css

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.