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:
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 ;
精彩评论