An Interest In:
Web News this Week
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
- March 25, 2024
December 26, 2020 02:53 pm GMT
Original Link: https://css-irl.info/a-utility-class-for-covering-elements/
A Utility Class for Covering Elements
Big ol’ same to Michelle Barker here:
Heres something I find myself needing to do again and again in CSS: completely covering one element with another. Its the same CSS every time: the first element (the one that needs to be covered) has
position: relative
applied to it. The second hasposition: absolute
and is positioned so that all four sides align to the edges of the first element.
.original-element { position: relative;}.covering-element { position: absolute; top:
… Read article “A Utility Class for Covering Elements”
The post A Utility Class for Covering Elements appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter.
Original Link: https://css-irl.info/a-utility-class-for-covering-elements/
Share this article:
Tweet
View Full Article