0
votes

I have created a CMS Static block into the header section of my Magento Site. On the home page it displays exactly how I want it however on every other page that I go to on my site it shifts over to the left. Any help is much appreciated. My site is http://diycomp.com

Here is my Header.phtml code the CMS block is titled "FreeShip":

<div class="header-container">
 <div class="header">
    <?php if ($this->getIsHomePage()):?>
    <h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
    <?php else:?>
    <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" <?php endif?><?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('FreeShip')->toHtml() ?> </a>        
</div>
<div class="quick-access"> 
    <?php echo $this->getChildHtml('store_language') ?>
    <p class="welcome-msg"><?php echo $this->getChildHtml('welcome') ?></p> 
    <?php echo $this->getChildHtml('topLinks') ?>
</div>
<?php echo $this->getChildHtml('topBar') ?>
<?php echo $this->getChildHtml('topContainer'); ?>

1

1 Answers

0
votes

You forgot to close the <img> tag on the else branch.

This

<?php else:?>
    <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" <?php endif?>

Should be

<?php else:?>
    <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /> <?php endif?>