CSS Horizontal Menu
I want to have a menu that consists of 6 tabs, 4 of which are visible at any given point. I'd like to use javascript to control the viewport of this div tag. I currently have 4 tabs showing, but I don't see the other tabs off to the right side beyond the viewport (I should see them given the width of the tab)... is overflow:hidden
not what I should be doing?
#sub-navigation .tabs {
position: absolute;
overflow: hidden;
float: 开发者_JS百科left;
width: 808px;
left: 34px;
}
overflow: hidden
will hide any content outside of the container's area. If you want content outside of the container's area to be visible you should use overflow: visible
.
It's hard to tell from your question exactly what it is you're trying to do though.
It seems like you're combining the tabs with their parent. By your question I would have expected something like this:
<ul> // position:absolute; width:808px;
<li></li> // float:left; width:?; margin:?;
</ul>
精彩评论