Forums

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

Home Forums CSS Changing Image On Click with CSS Using Checkbox

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #248534
    knbfoster
    Participant

    Hello,
    I have been working on this for the last 2 days and I’m about to lose my mind because I feel like it should be super simple, but I can’t figure it out. I am working on an element of a website where the user is supposed to click on a button and the button changes to answer a question. I wanted to just swap out the image when you click on the button. The checkbox input seems to be the best solution for this, however I need to have three of them lined up horizontally across the page and when I do this, only the first box is interactive.

    Here’s the code I have so far, http://codepen.io/knfoster/pen/ENoQKR

    In addition to this, I can’t for the life of my get them to line up horizontally. I’m sure there’s a line of CSS I’m missing. Any help would GREATLY appreciated.

    Thank you so much in advance!

    #248548
    Shikkediel
    Participant

    You were using the same id and for attribute multiple times. And I used inline-block on the parent div to line them up.

    Link

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