Forums

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

Home Forums CSS How can a button be placed on top of an image?age?

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

    Hello, and I hope you are having a great day but anyways, I have been trying to put a button (with popups) on top of an image along with a line (as a pointer) that already works. I use a bunch of containers for images

    Thanks for reading and tell me if you need anything more. Here is the codepen with everything in it(and a placeholder image)

    https://codepen.io/c0d3d1/pen/zYYPrPy

    #298292
    Beverleyh
    Participant

    and an intButton class for being on top which does not work

    In what way doesn’t it work?

    Have you tried the “top” property to set the vertical position? Negative values are permitted.

    #298301
    c0d3d
    Participant

    Yup @beeverleyh It just adds to the thumbnail still and turns black.

    #298367
    JeroenR
    Participant

    You can try something like this: https://codepen.io/jeroenreijs/pen/JjjpZOg.
    The popup has absolute positioning. The DIV with class .thumbnail. Because the other button is a child of the DIV with class .gallery-item, I added position: relative to that class as well.
    Now you can maybe play around with the positioning as they are now both in the center and therefore on top of eachother.

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