Cool Buddy
Wise Old Owl
In my website, I want to create a download button. The download button will point to either a word, excel or powerpoint file. This button will be used repeatedly. So I wrote the following code:
and placed a link like this:
This means I only need to change the ID to word or excel and the image will change.
This code worked perfectly on my PC when run locally. But when I put the same code on the server, it stops working. Also, it seems putting a div tag inside a link does not validate.
Any alternative idea how I could do this.
Code:
<style>
.downbut{
width: 240px;
height: 60px;
border-left: 10px solid #79ba33;
background-repeat: no-repeat;
}
#excel{
background: url('excel.png');
}
#word{
background: url('word.png');
}
</style>
Code:
<a href="*google.com"><div class="downbut" id="excel"></div></a>
This means I only need to change the ID to word or excel and the image will change.
This code worked perfectly on my PC when run locally. But when I put the same code on the server, it stops working. Also, it seems putting a div tag inside a link does not validate.
Any alternative idea how I could do this.