E
E
Ewars2017-02-17 11:39:41
css
Ewars, 2017-02-17 11:39:41

Why doesn't {width: 100%; max-width: 320px} + flexbox?

I made it with flexbox (prefixes are fine).
Set the width of the blocks:

.news {
    width: 100%;
    max-width: 320px;
}

Everywhere the blocks line up (Screenshot 1), and in Safari they line up in a column (Screenshot 2) and (attention!!!) when I rewrite the width to width: 320px, the blocks line up.
Why is that? Block width is already 320px thanks to max-width
b2142e155cd24ef0b03b9585166a95df.png908ef3e6c3864db68cee2e4688c2d719.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pestilent, 2017-02-23
@ewars

Min and max size declarations are ignored when wra... . Like it. In general, you need to set flex-basis.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question