1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

.css selector trigger CLP - help

Discussion in 'HTML & JavaScript' started by haza100, Feb 10, 2012.

  1. haza100

    haza100 Registered Member

    Joined:
    Feb 7, 2010
    Messages:
    63
    Likes Received:
    6
    Hi,
    Im very new to html and programming, and I'm having some problems:

    Im trying to make it so that when a user clicks a image link on my wordpress site, my content locker pops up before they can download the file. I managed to do it, but sometimes it works and other times it doesn't :confused:. I also want to make the .css selector trigger into a class, so i can use it on all 20 of my image links.

    Heres my sometimes-working code using a ID, instead of class:

    Code:
    <a href="mysite/folder/this-is-the-download-file.rtf" target="_blank"><img  class="aligncenter" src="mysite/folder/this-is-the-image-of-button.png" id="dl_loc" alt="Download" /></a>
    ^ I can't add the url ending as I'm a new member,

    Another glitch is that the button isn't centred on the site :confused:

    Thanks for any help, its much appreciated :)

    Harry.
     
  2. endgeek

    endgeek Regular Member

    Joined:
    Jan 7, 2012
    Messages:
    245
    Likes Received:
    117
    Occupation:
    Web- & Graphicdesign
    Location:
    Germany
    I can't se a css trigger? or do you mean dl_loc?

    if yes, just change id="dl_loc" to class="dl_loc" in the mainfile and replace #dl_loc with .dl_loc inside the css file
     
    • Thanks Thanks x 1
  3. haza100

    haza100 Registered Member

    Joined:
    Feb 7, 2010
    Messages:
    63
    Likes Received:
    6
    Thanks for the reply, yeah the trigger is the dl_loc. Ive tried that and it still aint working (N) - ill have another mess around with it when my host comes back online... free hosting is a bitch :damnit:
     
  4. hi.imandrew

    hi.imandrew Junior Member

    Joined:
    Nov 22, 2009
    Messages:
    159
    Likes Received:
    42
    Location:
    Arkansas, USA
    If your still needing help with this, shoot me a pm and show me your site, or paste relevant code here and I can take a look at it for you.
     
    • Thanks Thanks x 1
  5. haza100

    haza100 Registered Member

    Joined:
    Feb 7, 2010
    Messages:
    63
    Likes Received:
    6
    Hi,

    Once I get enough posts, and my host sorts it out, ill PM you, thanks alot :)
    Harry.