N1CK3RS0N Posted June 25, 2010 Share Posted June 25, 2010 Hello, I'm having some trouble getting the positioning of this JS to work. if ((this.id == "forecolor") || (this.id == "hilitecolor")) { parent.command = this.id; buttonElement = document.getElementById(this.id); document.getElementById("colorpalette").style.left = getOffsetLeft(buttonElement); document.getElementById("colorpalette").style.top = getOffsetTop(buttonElement) + buttonElement.offsetHeight; document.getElementById("colorpalette").style.visibility="visible"; } The problem is when I declare a doctype for the HTML page. For some reason the positioning stops working. It positions an iframe on the button that was clicked. Ideas? Link to comment https://forums.phpfreaks.com/topic/205879-js-positioning-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.