我们正试图在标题中添加3个图标后添加第4个图标。
但是我把它放在header.phtml下面的代码之下,它不起作用。
第4个图标显示在3个图标之前。我希望在3个图标后显示。
第4个图标的代码。
<img src="<?php echo $this->getSkinUrl('images/search_16.png');?>" alt="Search">
header.phtml
<div id="header">
<header id="header" class="page-header">
<div class="page-header-container">
<a class="logo" href="<?php echo $this->getUrl('') ?>">
<img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" class="large" />
<img src="<?php echo $this->getLogoSrcSmall() ?>" alt="<?php echo $this->getLogoAlt() ?>" class="small" />
</a>
<div id='hideshow'><img src="<?php echo $this->getSkinUrl('images/search_16.png');?>" alt="Search"></div>
<?php // In order for the language switcher to display next to logo on smaller viewports, it will be moved here.
// See app.js for details ?>
<div class="store-language-container"></div>
<!-- Skip Links -->
<div class="skip-links">
<a href="#header-nav" class="skip-link skip-nav">
<span class="icon"></span>
<span class="label"><?php echo $this->__('Menu'); ?></span>
</a>
<a href="#header-search" class="skip-link skip-search" id="hideshow1">
<span class="icon"></span>
<span class="label"><?php echo $this->__('Search'); ?></span>
</a>
<div class="account-cart-wrapper">
<a href="<?php echo $this->helper('customer')->getAccountUrl(); ?>" data-target-element="#header-account" class="skip-link skip-account">
<span class="icon"></span>
<!-- <span class="label"><?php echo $this->__('Account'); ?></span> -->
</a>
<!-- Cart -->
<div class="header-minicart">
<?php echo $this->getChildHtml('minicart_head'); ?>
</div>
</div>
</div>
<!-- Navigation -->
<div id="header-nav" class="skip-content">
<?php echo $this->getChildHtml('topMenu') ?>
</div>
<!-- Search -->
<div id="header-search" class="skip-content desktop-only">
<?php echo $this->getChildHtml('topSearch') ?>
</div>
<!-- Account -->
<div id="header-account" class="skip-content">
<?php echo $this->getChildHtml('topLinks') ?>
</div>
</div>
<!--<div id="header-search" class="desktop-only">
<?php echo $this->getChildHtml('topSearch') ?>
</div>-->
</header>
<?php echo $this->getChildHtml('topContainer'); ?>
</div>
答案 0 :(得分:1)
检查样式是否设置为那些img标签(或包装div或任何元素),如下所示
float : right;
如果是,请将第4个图标添加为第1个项目。然后它将显示在最后(3张图像之后)