Jump to content

carcoal

Members
  • Posts

    2
  • Joined

  • Last visited

About carcoal

  • Birthday July 8

Profile Information

  • Gender
    Male

carcoal's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thank you for the reply! I have a few questions: With the HTML, to make different classes for the multiple modals, would I have to make it: <div class="myModal1" class="modal"> For the first and then <div class="myModal2" class="modal"> for the second one, something like that? Or could the <div class="myModal" class="modal"> suffice for all 25? and then for the JavaScript, instead of making them ids, replace them with classes like this, right? // Get the modal var modal = document.getElementByclass('myModal1'); [and then myModal2, myModal3...] Lastly, I was wondering for each of the 25 modals, when you change them to class, do I add CSS for each of the 25? I have been playing with making them classes but now when I open my page, the modal boxes are already up and I can't close them. My plan for the modal box was that when the image was clicked on, a box would pop up. Then the user can then exit out the modal. And then they click on the next image and then the second modal comes up. Thank you again for any assistance!
  2. Hello, I am new to web design and I have to do a web page for class. I have hit a roadblock. I am making a list of 25 films and with each film listed, I wanted a modal box to pop up and give more information on the film. I'm using one of the w3schools tutorial: http://www.w3schools.com/howto/howto_css_modals.asp I am pretty much following this code exactly, save for a font change and background color change. My question is how to make multiple modal boxes for the page? I am thinking maybe the ID needs changing, but I am not sure. I have played around with the code but can't get more than one to pop up. I'm not exactly sure what all needs to change in order for more than one to pop up. Any help would be greatly appreciated!!
×
×
  • Create New...