Hi, I'm struggling to get any css applied to my blocks.

Could somebody please sense check the syntax for me - an I missing something?

Thanks.

Stuart

<?php
// $Id: block.tpl.php,v 1.2 2009/04/03 22:18:06 jrglasgow Exp $
?>
<div class="block block-<?php print $block->module; ?>" id="block-<?php print $block->module; ?>-<?php print $block->delta; ?> <?php print block_class($block); ?>">


  <?php if ($block->subject) { ?><h2 class="title"><?php print $block->subject; ?></h2><?php } ?>
  <?php if ($block->content) { ?><div class="content"><?php print $block->content; ?></div><?php } ?>

</div>

Comments

todd nienkerk’s picture

You have mistakenly added the Block Class output to the div's id attribute instead of class. The first line should read:

<div class="block block-<?php print $block->module; ?> <?php print block_class($block); ?>" id="block-<?php print $block->module; ?>-<?php print $block->delta; ?>">
todd nienkerk’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.