开发者

help with a HTML nested list that creates a sub nav

I am having trouble with my nested list that creates a subnav. Currently it is positioned absolutely, but I can not have it's parent positioned relatively as the overflow on the parents parent is hidden so the user cannot see the full sub nav, can anyone shed any light on a fix for this please?

Subnav Example

Plese see the link for a jsfiddle example of wh开发者_运维百科at I mean.


This should do the trick. Live example: http://jsfiddle.net/7VkrG/53/

You need to remove overflow:hidden on nav and give it a height instead e.g. 34px.

header nav {
  width:960px;
  border:1px solid red;
  height: 34px;  
}

Then you will want to adjust the positioning of the subnav so that it displays in the right place:

header nav li ul.dropdown {top: 5px;}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜