B
B
beefront172019-02-01 15:22:54
css
beefront17, 2019-02-01 15:22:54

Why doesn't child take 100% width, flexbox?

Good afternoon! Please tell me who had a similar situation.
There is approximately such a block

<div class="parent">
       <div class="child">{...}</div>
</div>

Layout on flexbox.
The problem is child can't take 100% width in any way, takes approximately 100% -10px.
as soon as I change any css property in parent or in child or just do hover the width becomes 100%. it looks like the css is not loading completely.
This behavior is only in chrome
Any idea what could be the problem?
I can't give an example on the codepen.
The project itself on react

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gleb Zubov, 2019-02-05
@Povedli

Because chrome adds padding (if I'm not mistaken 4 or 8 pixels)
Try to write simply

.otstupy{
margin : 0;
}

and add to parent!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question