2016-02-20 48 views
-1

我想用搜索框将Jquery Mega Menu添加到顶部菜单。Wordpress将Jquery Mega Menu添加到搜索框顶部

我能够将菜单添加到顶部,但搜索框未正确显示。

请参阅Demo2.sarwana.co.uk

我加了下面的CSS,但不能仍然得到它在我的菜单显示正确。

.woocommerce-product-search { 
    display: none; 
} 
.woocommerce-product-search { 
    display: block; 
    float: right; 
    position: relative; 
    margin-top: -40px; 
} 

https://drive.google.com/file/d/0B8gFW78WkjMSeVFBVnA1NFBmX3c/view?usp=sharing

回答

0
#dc_jqmegamenu_widget-2-item ul li a { 
    background-position-y: top !important; 
} 

检查的背景位置。此规则修复它

+0

那没有工作 – maj

+0

add'height:1em; ' – Apeiron

+0

.search a,.search form {height:1em; } 并删除新的-40px margin topp! – Apeiron

0
#dc_jqmegamenu_widget-2-item ul li a { 
    background-position-y: top !important; 
    height: 1em; 
} 
#dc_jqmegamenu_widget-2-item ul li form { 
    margin-top: auto; 
    height: 1em; 
}