Javascript: Positionin a DIV in Mozilla
Here's the code I'm running to try to align some items in Mozilla:
Code:
function setupDIVs() {
var objMenu = findDom('menubar');
objMenu.style.left = findLeft('logobar') + 10;
objMenu.style.color = '#003399';
}
function findLeft(objectID) {
if (findDom(objectID).offsetLeft) {
return findDom(objectID).offsetLeft;
} else if (findDom(objectID).clip.left) {
return findDom(objectID).clip.left;
} else {
return 0;
}
}
function findDom(objectID){
if (document.all){
return document.all(objectID);
} else if (document.getElementById){
return document.getElementById(objectID);
} else if (document.layers){
return (document.layers[objectID]);
}
}
The color changing works, but the element doesn't move.
Any ideas?