Any custom block with an empty title creates an empty h2 tag, this isn't a problem except for Firefox which treats this as a blank line and so nudges things down. There should be a check to see if the title is empty.

CommentFileSizeAuthor
#3 block.tpl_.php_.patch746 bytestostinni

Comments

Stefan Nagtegaal’s picture

this is fixed within PHPTemplate themes I thought.. But plain PHPThemes do not do this yet..

Feel free to correct me if I'm wrong..

ninetwenty’s picture

Not fixed in phptemplates. This is from block.tpl.php

<div class="<?php print "block block-$block->module" ?>" id="<?php print "block-$block->module-$block->delta"; ?>">
  <h2><?php print $block->subject ?></h2>
  <div class="content"><?php print $block->content ?></div>
</div>
tostinni’s picture

Version: 4.7.4 » 4.7.x-dev
StatusFileSize
new746 bytes

Do we still care of fixing 4.7 ?
In 5.1 it's corrected by:

<?php if ($block->subject): ?>
  <h2><?php print $block->subject ?></h2>
<?php endif;?>

If we still do care, here is a little patch

ricabrantes’s picture

Version: 4.7.x-dev » 4.7.11
ricabrantes’s picture

Status: Active » Closed (fixed)

4.x is no longer supported..