G
G
godsplane2020-10-06 23:26:58
Layout
godsplane, 2020-10-06 23:26:58

Why does flex behave differently in two identical layouts?

Hello everyone, I'm in a stupor how it works. The same piece of code works differently in different blocks.
Some of the blocks have no inheritance, why does it work like that? If you remove the flex, then the icon appears.

<div class="form-icon-wrapper">
        <div class="ico">
          <img src="wp-content/themes/default-theme/img/ico/phone-2.png" alt="">
        </div>
        [mask* mask-737 class:form-input "+7(__)__-__-__" "+7 (999) 999-99-99"]
 </div>


.form-icon-wrapper {
    display: flex;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 18px;
}


5f7cd29eafd9c037588208.png5f7cd2d10d6bb974074955.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lord_Dantes, 2020-10-06
@godsplane

It can be seen that the width of the icon is 0px, the input with flex "squeezes out" the image with its width. Set max-widtheither the width of the icon

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question