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
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>
Hidden Hit Counter My forum signature is under construction.
Sami4u (25 December, 2010)
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.
"It's inexcusable for scientists to torture animals; let them make their experiments on journalists and politicians." -Henrik Ibsen
Sami4u (25 December, 2010)
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
Sami4u (18 February, 2011)
Bookmarks