I have the following code in my CSS:
@media screen and (max-width:600px) {
...
.container {
display: flex;
flex-flow: column;
max-width: 100%;
}
.container p {
display: block;
max-width: 100%;
}
...
}
This renders as expected in Chrome and Firefox, but in IE, the text fails to wrap, and each paragraph is rendered as a single line (which typically exceeds the width of the screen). There's a variety of solutions which address this situation when 'flex-flow' is not set to 'column'. Is there a way to fix the word-wrapping issue, under the condition that 'flex-flow' is set to 'column', and without setting a fixed width for either the container or child element?
Update:
The issue appears to pertain to the width of the element outside of the container. Here's a fiddle that illustrates what's going on.
HTML:
<div class='wrapper'>
<div class='container'>
<p>
Lorem ipsum...
</p>
<br>
<p>
Lorem ipsum dolor sit amet...
</p>
</div>
</div>
CSS:
.container {
display: flex;
flex-flow: column;
}
.container p {
max-width: 100%;
}
.wrapper {
clear: both;
float: left;
max-width: 1000px;
margin-top: 20px;
}
In the above example, the text will wrap in Chrome and Firefox, but will not wrap in IE. If, for example, the value of 'display' is changed to 'table', the paragraph text will wrap as expected in all browsers.