Forums

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

Home Forums CSS CSS Rollover Breaks masonry

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #41787
    bogus
    Participant

    As chrisburton [suggested](https://css-tricks.com/forums/discussion/21585/how-do-i-replicate-this-hover-effect#Item_21 “”) here’s the new thread about more complex rollovers.

    I’ve adapted chris [codepen](http://codepen.io/chrisburton/pen/xKLwd “”) example to my project and everything went fine except for links in the rollover. If i put links in the rollover it breaks my masonry layout.

    I made an example (actually another fork of chris snippet) on [Codepen](http://codepen.io/anon/pen/armIo “”)
    The rollover won’t work as long as there’s an a tag somethere inside the rollover.

    it seems it has something to do with nesting links in links but how am i supposed to handle that?

    Many thanks in advance.

    #120025
    chrisburton
    Participant

    The problem is that you can’t nest anchor links.

    You may have to use absolute positioning to position the overlay over the image.

    Something like this:





    #120026
    bogus
    Participant

    but isn’t the overlay already positioned absolutely?

    #120027
    chrisburton
    Participant

    Hang on that might not work. Do you have codepen pro?

    #120028
    bogus
    Participant

    no. I’m more of a casual coder (as one can obviosly see), sorry :(

    #120030
    chrisburton
    Participant

    Hmm. I’m not sure how to go about this since you need the whole thing to wrap in an anchor tag (and you can’t nest anchor tags). If I go about it the way I was thinking, the `ul` that wraps around the tags will not be clickable.

    If we go about it the way you’d like, the user could accidentally clicks outside one of the tags and be redirected to wherever the thumbnail links to. Basically it could be annoying to the user.

    #120032
    bogus
    Participant

    i don’t think there will be too much trouble with usability since the tag links are quite big in size as you can see here [http://tingeltangel.megavillain.org/](http://tingeltangel.megavillain.org/http://tingeltangel.megavillain.org/”)

    #120037
    chrisburton
    Participant

    What is the browser support requirement?

    #120046
    chrisburton
    Participant

    @bogus This is as far as I could go with it: http://codepen.io/chrisburton/pen/jesmr

    Your best solution is probably jQuery.

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