In the process of developing my game, I encountered a challenge where text needs to be dragged under specific images. To achieve this, I envision creating tabs below the images for the text to be dragged onto.
My initial approach involved wrapping each image in a div and nesting another div within it for the tab. In CSS, I styled the tab's height to be 25px. However, the tab is not aligning properly under the image within the same div; instead, it appears above other images in that row.
This visual representation illustrates the issue: http://prntscr.com/9yv7m8. The red space demonstrates where the tab should sit beneath the pictures.
I am seeking guidance on how to rectify this situation effectively. Below is the relevant section of my code:
- CSS:
body, html { margin-left: 10%; margin-right: 10%; padding: 0px; height: 100%; font-family: georgia, "Comic Sans MS"; background-color: #f0f0f0; } header { height: 5%; border-bottom: thick solid grey; } footer { height: 5%; border-top: thick solid grey; } .points { float: right; } .container { width: 100%; height: 90%; } .plaatje { width: 100px; height: 100px; } .plaatje2 { float: left; width: 25%; } .igen { font-size: 25px; font-weight: bold; } .sprint { float: right; } .copyright { position: relative; bottom: 20px; left: 65px; font-size: 10px; } .img { width: 25%; height: 25%; float: left; } .img2 { width: 25%; height: 25%; float: left; } .answer { height: 25px; }
- HTML: