simpleads_block.tpl.php contains the following code snippet

<div class="header">
  <div class="ad-link"><?php if(!is_null($ads_page) && !empty($ads_page)) : print l(t('Advertise with us'), $ads_page); endif; ?></div>
</div>

If the inner test fails ($ads_page URL is not entered by the editor, but left blank) then it still creates a pair of nested divs

<div class="header">
<div class="ad-link"></div>
</div>

The css for class header is

.header {
    height: 105px;
    padding-top: 25px;
}

and this creates a 130px blank space between the level 2 header "Advertisement" and the image or text body of the advert. May I respectfully suggest that the code be changed to

<?php if(!is_null($ads_page) && !empty($ads_page)) : ?>
<div class="header">
  <div class="ad-link"> <?php print l(t('Advertise with us'), $ads_page); ?> </div>
</div>
<?php endif; ?> 

or similar. I believe it achieves the same result if the test is passed, but will not create the unsightly gap otherwise.
Maybe the true cause of the bug lies elsewhere and $ads_page is not being properly set up.

Comments

pjaj’s picture

Version: 7.x-1.8 » 7.x-1.9
Issue summary: View changes
minnur’s picture

Status: Active » Closed (won't fix)