Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Onclick event or just a href on images?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37873
    anthonylimere
    Participant

    Hello css-tricks forum, I will be posting my first question!

    I’d like to have my image to send a link to another page with php filtering on a list, but I can’t even make the basic link.. so I’m quite confused.

    This is my website (still making the design) http://www.diablo-movies.com

    This is the code


    Classes









    Thanks!

    ps : this is the css code linked to each image

    img.barbarianimg {
    margin-bottom:1px;
    cursor:pointer;

    }

    img.monkimg {
    margin-bottom:1px;
    cursor:pointer;

    }

    img.wizardimg {
    margin-bottom:1px;
    cursor:pointer;

    }

    img.demonhunterimg {
    margin-bottom:1px;
    cursor:pointer;

    }

    img.witchdoctorimg {
    margin-bottom:1px;
    cursor:pointer;

    }
    #102106
    Blackhawkso
    Member

    @antonylimere I’m a little confused is what your wanting the site to do is if someone clicks to say there a wizard it would then load the page with items that are to do with being a wizard. If that’s right all you really need to do to your code is this.


    Classes









    Then at the top of the targeted php file you add the following code.

    $class = $_GET;

    and then you will have the selected class in a php string to do what ever you want with it.

    hope this helps.

    #102107
    anthonylimere
    Participant

    This helped quiete much, thank you!

    #102108
    Blackhawkso
    Member

    No problems

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.