Pierre [mailto
[email protected]] ink wired:
On my internet site i want to add a button
that enable the user to download a file.
Easy. Follow these steps.
--------
STEP ONE
--------
Add the following style to the header of your HTML document:
<STYLE>
a.button:link, a.button:visited, a.button:hover
{
text-decoration:none; font-variant: small-caps; border-style: outset;
border-width: 2; padding-left: 2; padding-right: 2; padding-top: 0;
padding-bottom: 0; background-color: #C0C0C0
}
a.button:active, a.button:focus
{
text-decoration:none; font-variant: small-caps; border-style: inset;
border-width: 2; padding-left: 2; padding-right: 2; padding-top: 0;
padding-bottom: 0; background-color: #C0C0C0
}
</STYLE>
--------
STEP TWO
--------
Create a hyperlink like this (assuming the file they are downloading is
called "myFile.pdf"
<A HREF="myFile.pdf" CLASS="button">DOWNLOAD</A>
--------
OPTIONAL
--------
If you want button behavior like having button pop up after click, add
JavaScript to blur focus to the on mouse off or after click event(s).
Hope that helps.