T
T
Theory Theory2020-04-28 19:22:46
css
Theory Theory, 2020-04-28 19:22:46

Why doesn't position absolute work with display flex?

https://jsfiddle.net/tzs25um6/2/

If set as a percentage, the picture is not displayed, I need to set it as a percentage, and if in pixels, it is displayed. Why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WapSter, 2020-04-28
@Narbek

Because the percentages are calculated from the width of the parent. For the parent, it is equal to 0, but as from the 2nd grade mathematics course, we know that it is impossible to divide by 0.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question