Magento标头跳跃 [英] Magento header jumping
问题描述
我有一个奇怪的错误,即浏览网店的magento网店标题上的类别时会更改不同页面上的高度( http://shop.tvornica-snova.hr/index.php/)
I have strange bug where while browsing through categories on the magento webshop header of the webshop changes height on different pages (http://shop.tvornica-snova.hr/index.php/)
即,如果您在主页上,然后单击标题扩展的某些类别,以使标题的高度增加10像素,并且将内容压低.
Ie if you are on the homepage, and click on some of the categories the header extends for additinal 10px in height and kind of pushes the content down.
我似乎在首页和类别上都具有相同的html结构和布局,因此我无法弄清楚该错误在哪里.
I seem to have same html structure and layout for the both homepage and categories so I cannot figure out where is the bug.
有人可以帮忙吗?
推荐答案
查看标记的header-top
部分以获取普通页面和跳转"页面.
Check out the header-top
section of your markup for a normal page, and for the "jumping" page.
普通:
<div class="logo">
<strong>Magento Commerce</strong>
<a href="http://shop.tvornica-snova.hr/index.php/" title="Magento Commerce" class="logo">
<img src="http://shop.tvornica-snova.hr/skin/frontend/default/f002_yellow/images/logotvornica.png" alt="Magento Commerce">
</a>
</div>
跳跃:
<a href="http://shop.tvornica-snova.hr/index.php/" title="Magento Commerce" class="logo">
<strong>Magento Commerce</strong>
<img src="http://shop.tvornica-snova.hr/skin/frontend/default/f002_yellow/images/logotvornica.png" alt="Magento Commerce">
</a>
第一个包含对class="logo"
的两个引用,该引用的定义规则为margin-top: -10px;
.对于您的任何页面,标题都是最接近页面顶部的情况就是这样-它被20px
The first one contains two references to class="logo"
, which has a defined rule of margin-top: -10px;
. This is the case for any of your pages where the header is the closest to the top of the page - it is being pulled up by 20px
第二个标记的标记略有不同,并且仅包含对该类的一个引用-因此您看到的是10px的偏移量.
The second one is marked up slightly differently, and contains just one reference to the class - hence the 10px shift you see.
这篇关于Magento标头跳跃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!