I found a really simple example menu using CSS and Javascript and Im trying to figure it out. I have figured out how to change just about everything on it, but one thing. I can change the width of the menu items displayed by changing the width here:
.css_menu li a {
display: block;
width: 250px;
height: 20px;
line-height: 20px;
padding-left: 4px;
padding-right: 4px;
text-align: center;
text-decoration: none;
border: 0px solid gray;
color: black;
background-color: #CC9966;
}
But when you mouse over the menu items there's only a tiny bit of the displayed menu that will actually drop down the sub menus for selection. For example, if my menu item is "Annual Income Reports" you might have to mouse over the "al" to get to the drop down menus. You can mouse over ANY part of "Annual Income Reports" to display the lower menus but to actually be able to CLICK on them you have to find that magic spot. Can anybody point me to the right place to look for this "select spot" so I can set it to respond to clicks on any part of the menu item?
I've got three files, the CSS, a Javascript file and an HTML file that calls it all and i can find nowhere in any of those where i can change the "hot spot" to cover the entire menu selection area.
here is the javascript bit too:
(function () {
var _int_adjust_hover = function () {
var dom_uls, dom_lis, i, j;
dom_uls = document.getElementsByTagName ('ul');
for (i = 0; i < dom_uls.length; ++i) {
if ((/^(.*\s+)?css_menu(\s+.*)?$/i).test (dom_uls .className)) {
dom_lis = dom_uls .getElementsByTagName ('li');
for (j = 0; j < dom_lis.length; ++j) {
dom_lis [j].onmouseover = function () {this.className += ' hover';};
dom_lis [j].onmouseout = function () {this.className = this.className.replace (/\s*hover/, '');};
}
}
}
};
if ('addEventListener' in window) {
window.addEventListener ('load', _int_adjust_hover, false);
} else if ('attachEvent' in document) {
window.attachEvent ('onload', _int_adjust_hover);
} else {
window.onload = _int_adjust_hover;
}
}) ();
Sorry to have to ask for help with such basic stuff but this is new stuff for me.
thanks for any info
.css_menu li a {
display: block;
width: 250px;
height: 20px;
line-height: 20px;
padding-left: 4px;
padding-right: 4px;
text-align: center;
text-decoration: none;
border: 0px solid gray;
color: black;
background-color: #CC9966;
}
But when you mouse over the menu items there's only a tiny bit of the displayed menu that will actually drop down the sub menus for selection. For example, if my menu item is "Annual Income Reports" you might have to mouse over the "al" to get to the drop down menus. You can mouse over ANY part of "Annual Income Reports" to display the lower menus but to actually be able to CLICK on them you have to find that magic spot. Can anybody point me to the right place to look for this "select spot" so I can set it to respond to clicks on any part of the menu item?
I've got three files, the CSS, a Javascript file and an HTML file that calls it all and i can find nowhere in any of those where i can change the "hot spot" to cover the entire menu selection area.
here is the javascript bit too:
(function () {
var _int_adjust_hover = function () {
var dom_uls, dom_lis, i, j;
dom_uls = document.getElementsByTagName ('ul');
for (i = 0; i < dom_uls.length; ++i) {
if ((/^(.*\s+)?css_menu(\s+.*)?$/i).test (dom_uls .className)) {
dom_lis = dom_uls .getElementsByTagName ('li');
for (j = 0; j < dom_lis.length; ++j) {
dom_lis [j].onmouseover = function () {this.className += ' hover';};
dom_lis [j].onmouseout = function () {this.className = this.className.replace (/\s*hover/, '');};
}
}
}
};
if ('addEventListener' in window) {
window.addEventListener ('load', _int_adjust_hover, false);
} else if ('attachEvent' in document) {
window.attachEvent ('onload', _int_adjust_hover);
} else {
window.onload = _int_adjust_hover;
}
}) ();
Sorry to have to ask for help with such basic stuff but this is new stuff for me.
thanks for any info