I
I
imko2022-04-17 01:52:46
css
imko, 2022-04-17 01:52:46

Element centered without position:absolute?

Straight to the point - pen . The task is to put the green block not equally between the brothers but equally in the middle of the parent without using position:absolute, scripts and fixed sizes/indents of course). Flex is just an example here, you can use everything except the obsolete/condemned one, for example float`a So that green at the same time rests on the brothers if it tries to get into the "occupied" place.
Why do I need this, I don’t know myself, it just became interesting) Probably it will come in handy somewhere

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
godsplane, 2022-04-17
@godsplane

https://qna.habr.com/q/1088262

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question