The YUI MenuBar seems to have an issue with being below a header.
HTML:
<body class="yui-skin-sam">
<a id="headerStyle"><img href="/" src="/images/Header.jpg" alt="Home"/></a>
<div id="menuPanel" style="padding:1px">
CSS:
#headerStyle {
position:relative;
width:600px;
height:100px;
}
Javascript:
var oMenu = new YAHOO.widget.MenuBar("mymenu");
oMenu.addItems([
{
text: "Main",
submenu: {
id: "menu1",
itemdata: [
{ text: "1" },
{ text: "2" },
{ text: "3" },
{ text: "4" },
{ text: "5" },
{ text: "6" },
{ text: "7" },
{ text: "8" }
]
}
}
]);
oMenu.render($("#menuPanel").get(0));
oMenu.show();
Clicking MenuBar for the first time, it displays only 3 items with scrolling. The issue goes away after the first click.
Any ideas?