image map creation process

reposition container
create javascript for creating clickable divs
over each piece of chocolate
use flex to position divs
This commit is contained in:
emma 2025-01-29 22:37:53 -05:00
parent 57604e0be7
commit df84316ad4
2 changed files with 20 additions and 5 deletions

View File

@ -0,0 +1,14 @@
const chocolateContainer = document.querySelector(".chocolates");
const notesForEmma = {
};
for (let i = 0; i < 3; i++) {
for (let j = 0; j < 4; j++) {
const tile = document.createElement("div");
tile.classList.add("chocolate");
tile.style.height = "14vh";
tile.style.width = "7vw";
chocolateContainer.appendChild(tile);
}
}

View File

@ -25,13 +25,14 @@ body {
}
.chocolates {
display: flex;
flex-wrap: wrap;
height: 44vh;
width: 18vw;
width: 32vw;
top: 15vh;
left: 6vw;
padding-left: 1.25rem;
padding-top: 1.25rem;
padding-right: .5rem;
left: 12vw;
padding-left: 2rem;
padding-top: 2rem;
position: absolute;
z-index: 1;
}