Follow

If I find myself using negative margins in , how likely is it that there's a newer, better way to do what I'm trying to do?

@deutrino My guess: very likely, unless you're combining negative margins with floats.

Browser engines wouldn't want to track any more float-lists than the two they already do, and I wouldn't either.

@alcinnz Thinking about float lists is a little beyond me.

Right now, I'm using a Wordpress visual builder type thing and my first inclination to get a div further up within its containing box (which is set to vertical-align: middle) was to use top: -4rem, and then I also tried margin-top: -4rem. Both worked fairly well although I have previously seen relative positioning act weird in the builder element I'm using.

I suppose relative positioning is less worse here..

@deutrino And you shouldn't have to, it should be all under the hood of the browser.

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!