Html – Position a div element relative to its previous sibling (piano keyboard styling)
I'm developing a piano keyboard using HTML + CSS. My code structure is as follows: :root { --piano-width: 600px; --piano-height: 150px; --piano-keys-gap: 1px; --piano-black-keys-height-perc: 0.6; } .piano-keys { display: flex; flex-direction: row; justify-content: center; width: var(--piano-width); height: var(--piano-height); } .piano-key…