Click to See Complete Forum and Search --> : Button...?
Paul Jr
08-14-2003, 12:34 AM
See here... (http://www.freewebs.com/deathshouse/test2.html) See the little box and the text inside it? (If you don't, click on the linke! That's where it is) Is there a way to get the text to drop down and to the side slightly on an "onMouseDown" then back up with a "onMouseUp" to create the illusion of a button?
Khalid Ali
08-14-2003, 12:51 AM
Yes use CSS,and set the margin-left property as well as margin-top properties at on mouse down and reset them at mouse up.
Paul Jr
08-14-2003, 12:53 AM
Pardon my inexperience and lack of knowledge, but please elaborate.
With the code maybe?
Khalid Ali
08-14-2003, 01:05 AM
Its just an idea,there are better ways of achieving this
<html><head>
<style TYPE="text/css">
.text{color:gray; font-size: 10pt; }
a:link{color: gray; text-decoration: none; }
a:active{color: gray; text-decoration: none; }
a:visited{color: gray; text-decoration: none; }
a:hover{color: gray; text-decoration: none; }
</STYLE>
</head>
<body>
<table BORDERCOLOR="gray" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<tr><td CLASS="text" WIDTH="70" ALIGN="center"><a HREF="http://www.hotmail.com" onclick="return false;" onMouseOver="window.status='HELP!!!!'; return true" onmousedown="this.parentNode.style.fontSize='8pt';" onmouseup="this.parentNode.style.fontSize='10pt';">E n t e r</a></td></tr>
</table>
</body>
</html>
Paul Jr
08-14-2003, 02:17 AM
That looks pretty good, thanks.
Anyone else have any bright ideas?
Khalid, what does onmousedown="this.parentNode.style.fontSize='8pt';" onmouseup="this.parentNode.style.fontSize='10pt';" do?
Paul Jr
08-14-2003, 02:28 AM
Let me pose another, possibly better, question:
Does anyone know of a way to give the illusion of a button with a table cell and text using "onMouseDown" and "onMouseUp"?