What is nice solution to make elements relative

I mean for basic position: relative; for container or wrapper like.

.wrapper{position: relative;}


section .elementdiv{position: relative;}

Or still what is best looking to make elements relative? Like have two position absolute element and there one wrapper but default in wrapper not have position apply. Then apply to wrapper or make an another div just for position: relative;

Or any others idea?

Put it on the wrapper—that would generally be the main purpose of a wrapper/container, to dictate a certain layout. Don’t add more nested wrapper elements unless you really need them.

1 Like