开发者

CSS drop down menu issue

I have created a CSS drop down menu at http://elankeeran.com/test/dropdown.html, but I am facing an on hover issue. Home tab is working fine. And I wan开发者_Python百科t to remove the width for <ul id="menu" style="width:35px;"> any idea how to remove the width.

The "left Home" top border is missing as shown in the image below:

CSS drop down menu issue

How would I be able to fix this?


The culprit is the z-index:-1 in the .dropdown_2columns css. If you remove that, you get your borders back. Was there a reason you set the z-index to -1?


If width is the only style applied, you can remove the entire style attribute by $('#menu').removeAttr('style'); Edited: oops, I don't know if you are using jQuery.


I think you can simply do:

delete document.getElementById("menu").style.width ;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜