Results 1 to 5 of 5

Thread: Can CSS code be made clickable?

  1. #1

    Can CSS code be made clickable?

    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
    Current Celebrity Gossip Movies & More TV Site
    Find out how I'm able to get up to 420 backlinks for month, by spending 30 seconds per day...all for FREE! - Click Here

  2. #2
    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>

  3. #3
    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.
    "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin


  4. #4
    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
    Current Celebrity Gossip Movies & More TV Site
    Find out how I'm able to get up to 420 backlinks for month, by spending 30 seconds per day...all for FREE! - Click Here

  5. #5
    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

Similar Threads

  1. What Do You Do With The Money You Made ?
    By StephenM in forum Business
    Replies: 24
    Last Post: 9 November, 2010, 03:15 AM
  2. What made you get your own forum ?
    By StephenM in forum Community Building
    Replies: 19
    Last Post: 13 July, 2010, 03:41 AM
  3. a few things i made
    By Dragoth in forum General Chat
    Replies: 7
    Last Post: 14 April, 2010, 20:48 PM
  4. My Blog Made it Big
    By Jamivibes in forum Blogging
    Replies: 2
    Last Post: 21 August, 2009, 14:17 PM
  5. How much money did you made this day?
    By console_predator in forum General Chat
    Replies: 20
    Last Post: 3 August, 2009, 10:55 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •