Hi,
The title says it all. Can a css code be made into a clickable link?
If so what is the code for that please.
I think I have tried every link code I know none seem to be working:(
Thanks in advance.
Sami
Printable View
Hi,
The title says it all. Can a css code be made into a clickable link?
If so what is the code for that please.
I think I have tried every link code I know none seem to be working:(
Thanks in advance.
Sami
CSS code is only for styling the appearance of web page elements such as for the color or margins etc.
You have to use Javascript to make web page elements clickable.
Basically you insert an attribute into the element such as the onClick event handler. It's best to read up on this at places such as Tizag.com or W3Schools.com
Code:<div onclick="location.href('http://mysite.com')">Click Here</div>
Sami, you must be referring to a link that is styled using CSS. You can do mouseover changes to an HTML or JavaScript link wth CSS, but CSS has no ability to provide a clickable link.
Hi,
OK well never hurts to try I have a plugin that needs work, I was hoping I could get to it this way :(
Looks like another project for a coder if I ever find one the wants to work.
Sami
If we are talking about images, then usually background images which are set in an external .css file for example can't be used for links, but there are ways to get around that.
Some examples:
CSS Trick: Turning a background image into a clickable link - Xavisys
Tutorial 1 - Clickable Background Image in CSS
Creating clickable background images using CSS - Joomla! Documentation