0 Members and 1 Guest are viewing this topic.
div#ball {background-image:url('gr/ball.png');position:relative;width:600;height:600;z-index:1;}div#reply{position:relative;top:315;z-index:2;}
<div id="reply"><img src="gr/nothing.png"> (it changes when you click the button)</div><div id="ball"></div>
Ok, so i have 2 divisions inside a table:Code: (style) [Select]div#ball {background-image:url('gr/ball.png');position:relative;width:600;height:600;z-index:1;}div#reply{position:relative;top:315;z-index:2;}Code: (in the table) [Select]<div id="reply"><img src="gr/nothing.png"> (it changes when you click the button)</div><div id="ball"></div>As you see in the attached pic, there is a giant space above the ball thats the same size as the image in the reply div. Can anyone help me with this?
<html><head><title>Magic 8 Ball</title><script type="text/JavaScript">function answer(){now = new Date();num = now.getSeconds() % 16;document.ans.src=("gr/pic" + num + ".png");}function check(){if (document.ask.question.value.length == 0){alert("Please enter a question!");document.ask.question.focus;}else{answer();}}</script><style type="text/css">body {background-image:url('gr/8ball.png');background-repeat:no-repeat;background-position:left top;}.pies {font-family:Arial;font-size:22px;}div#ball{background-image:url('gr/ball.png');position:relative;width:600;height:600;z-index:1;}div#reply{position:relative;top:315;padding:0;z-index:2;}</style></head><body bgcolor="#aaaaaa"><table border="2" cellpadding="2" cellspacing="0" width="60%" align="center" bordercolor="#777777"><tr><td bgcolor="#999999" align="center" valign="top"><div id="reply"><img src="gr/nothing.png" name="ans"></div><div id="ball"></div><br><form name="ask" action="">What is your question?<br><input type="text" name="question" size="45"><br><input type="button" value="Shake!" onMouseDown="check()"></form><br></td></tr></table></body></html>
<div id="myDiv" style="position:absolute;width:50px;height:50px;"></div><script type="text/javascript">function $(e) { return document.getElementById(e); }$('myDiv').style.left = ( (screen.width / 2) - ( $('myDiv').style.width / 2 ) );$('myDiv').style.top = ( (screen.height / 2) - ( $('myDiv').style.height / 2 ) );</script>
Lordy i think thats a bit beyond my level...my teacher might get suspicious. I decided to just put a big header on top of the blank space.
Just don't use this. http://ourl.ca/9036