Provided:
.layout {
display: flex;
flex-wrap: nowrap;
align-items: stretch;
}
.layout aside,
.layout main {
min-width: 100px;
}
.layout aside {
flex: 0 0 content;
background-color: red;
}
.layout main {
flex: 1 1 content;
background-color: green;
}
<div class="layout">
<aside>
<p>Line 1</p>
</aside>
<main>
<p>Line 1</p>
<p>Line 2</p>
<p>Line 3</p>
</main>
</div>
My goals are:
- Make the aside element expand to fit its content and keep a fixed width
- Allow the main element to take up all remaining horizontal space
- Ensure that both aside and main have equal height, whichever is greater
However, when inspecting the code in Chrome, I encounter errors with the flex:
property for both elements.
Invalid property value
Additionally, the green box does not expand properly on the right. This issue occurs in Chrome version 56.0.2924.87 (64-bit) on Mac OS X 10.11.5.
What could be causing this problem?