Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 26, 2020 02:53 pm GMT

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 has position: 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:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks