title: How to add items to dropup html/css using java
body: <p>I have images that, when you hover over them, a dropup appears. I want to add a button to the bottom of the website that adds a user input item to the dropup.</p>
  
  <p>I have tried using addTo but I can't figure out how to use it with a drop up.</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
      &lt;html&gt;
      &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;style&gt;
  
      .dropup-content {
        display: none;
        position: absolute;
        background-color: #f1f1f1;
        min-width: 160px;
        bottom: 50px;
        z-index: 1;
        height: 132px;
        overflow: auto;
      }
  
      .dropup-content a {
        color: black;
        padding: 12px 16px;
        text-decoration: none;
        display: block;
      }
  
      .dropup:hover .dropup-content {
        display: block;
      }
  
      &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;div class="dropup"&gt;
        &lt;img src="https://i.imgur.com/5mXfwr1.jpg"&gt;
        &lt;div class="dropup-content"&gt;
          &lt;a href="http://www.echoecho.com/htmltext03.htm"target="_blank"&gt;PF thing 1&lt;/a&gt;
          &lt;a href="#"&gt;PF thing 2&lt;/a&gt;
          &lt;a href="#"&gt;PF thing 3&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;/body&gt;    
      &lt;/html&gt;
  </code></pre>
  
  <p>I based my code of of <a href="https://www.w3schools.com/howto/howto_css_dropup.asp" rel="nofollow noreferrer">this example</a>. It works as intended but I need to modify it so that you can add items on a button click.</p>