@@Pit
/* offest parent festlegen */ .calendar td { position: relative; }Warum an dieser Stelle "position: relative;"?
Absolute Positionierung erfolgt „with respect to its containing block. The containing block for a positioned box is established by the nearest positioned ancestor (or, if none exists, the initial containing block…).“ [CSS 2.2 §9.8.4]
Nearest positioned ancestor heißt: das nächste Vorfahrenelement, dessen position-Eigenschaft nicht den Wert static (Defaultwert) hat.
Wenn sich die absolute Positionierung des Buttons also auf die Tabellenzelle beziehen soll, musst du deren position-Eigenschaft einen anderen Wert geben als static – und zwar einen, der die Tabelle nicht kaputtmacht o.a. Nebenwirkungen zeigt. Genau das leistet relative.
LLAP 🖖
--
“When UX doesn’t consider all users, shouldn’t it be known as ‘Some User Experience’ or... SUX? #a11y” —Billy Gregory
“When UX doesn’t consider all users, shouldn’t it be known as ‘Some User Experience’ or... SUX? #a11y” —Billy Gregory