Re: [csswg-drafts] [css-position][css-sticky] Position: sticky doesn't work when it has several HTMLElements with margin before it (#3923)

just make the parent div abosolute and height full screen

```
 <div className="grid place-items-center p-2">
            {/* Timer and Instructions Banner */}
            <div className="absolute h-full">
                <div className="flex gap-1 justify-between items-center sticky top-2 z-10">
                    <ProgressBar
                        value={(60 - timeRemaining) * (100 / 60)}
                        showValue={false}
                        style={{ height: '8px', width: "70%" }}
                    />

                    <span className="font-bold flex items-center gap-2">
                        <i className="pi pi-clock text-orange-500"></i>
                        ⏳ {formatTime(timeRemaining)}
                    </span>
                </div>
            </div>
</div>

```

-- 
GitHub Notification of comment by bloodykheeng
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3923#issuecomment-2909304993 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 26 May 2025 10:54:11 UTC