MDanz Posted June 1, 2011 Share Posted June 1, 2011 i want the div to start off hidden. I know how to make it show and hide. The problem is when i load the page the border is seen. If i use display:none; in the div css the div doesn't display even when i press the button with the function to show. open and close function function infobox(number) { document.getElementById('userinfo').style.display = "block"; //displays userinfo } function closeinfo() { document.getElementById('userinfo').style.display = "none"; } div css #userinfo { position:absolute; text-align:left; width:900px; height:auto; top:100px; left:50%; font-size:14px; font-family:Arial; z-index:20; margin-left:-450px; background-color:#FFFFFF; border:1px solid #264971; } Quote Link to comment Share on other sites More sharing options...
arbitter Posted June 1, 2011 Share Posted June 1, 2011 I'm no hero, but what if you use document.getElementById('userinfo').style.visibility='hidden' or 'visible'? 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.