Adding links in css

  • Author
    Posts
  • #75478

    Hi
    I’ve got an image that I’ve put into my css script (to form part of the layout of the page) and I was wondering if I could attach a link to it. http://thehashmark.wordpress.com – the image is the technorati logo at the bottom of posts (obviously I’d like the link to go to the technorati home page).
    Cheers

    #75746

    drmike
    Member

    Not in CSS. You would have to hardcode the theme.

    engtech has been doing some stuff with moving around the widgets within the page. I don’t know if he’s done any write ups on teh subject though.

    #75756

    atthe404
    Member

    I am not sure. What about the pseudo class .before?

    #76014

    that’d be a nice trick, but i don’t think it’ll work.
    ::before
    doesn’t execute any of the code you stick in there, unfortunately. (at least not as i can get it to, it just displays the raw HTML). you can get things like images in there with this trick:

    p.tagged:before {
    content: url('http://thehashmark.files.wordpress.com/2007/02/technorati15x11.gif')
    }

    so perhaps if you made an html file with your link in it, you could pull in the html via url(”) ?

    that would seem to be a substantial security risk, though, so even if you could get it to work, wordpress.com might strip it out.

    #76016

    drmike
    Member

    Feedback sent just in case. :)

    #76184

    atthe404
    Member

    Without access to the html this is bending the abilities of the CSS hackers. :)

The topic ‘Adding links in css’ is closed to new replies.