At www.groenerekenkamer.com I have installed the poll. I do not need a title so I have typed there, I have the impression that Drupal accepts the absence of a title, but claims the space nevertheless. I would very much like my text to move upward, reclaim that empty line. Any help available?

Thanks,

TR

Comments

WhatTheFawk’s picture

In your themes block.tpl.php is where you can theme the output of blocks, you're correct Drupal always puts the h2 holder tags even if there's no block title and thats how it is in most themes block.tpl.php too. To check and remove the entire div if theres no title, in your current themes block.tpl.php:

Change:

<h2 class="title"><?php print $block->subject; ?></h2>

To:

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

Also the theme are you using might make the difference, because some CSS like in system.css adds padding to the top of form-item, which the poll is in, like this.

system.css

.form-item {
  margin-bottom:1em;
  margin-top:1em;
}

If you took out margin-top the space would be even less.

theorichel’s picture

A piece of code that works in one go! Incredible! Many thanks

TR