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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.