Hi,
New to flex-box and having some issues.
I have one box which I want to take up the full width ( contains a slide-show ). The next two boxes should wrap underneath one taking 2/3 and the other 1/3 of the overall width.
In Chrome and IE11 once the browser window’s width is dragged beyond the body’s max-width of 1200px the flex-box goes belly-up.
The first item ‘slider’ proceeds to fill the entire box forcing the text content of the other two items outside to the right of the box. It seems to function as intended in firefox.
Obviously it’s my ignorance at issue here. If anyone can point me in the right direction, would be much appreciated.
Cheers
RLM
A simplified version below.
<!DOCTYPE html>
<html lang='en'>
<head></head>
<style>
body {
max-width: 1200px;
margin: 0 auto;
}
main {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-flow: row wrap;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
-webkit-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
}
#slider {
-webkit-flex: 1 auto;
-ms-flex: 1 auto;
flex: 1 auto;
background-color: cyan;
}
#slider div{
width: 1200px;
height: 200px;
background-color: gray;
}
#mainInfo {
-webkit-flex: 2;
-ms-flex: 2;
flex: 2;
background-color: orange;
}
aside#sideBar {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
background-color: green;
}
</style>
<body>
<main role='main'>
<div id='slider'>
<div></div><!-- Slider goes here -->
</div>
<div id='mainInfo'>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
<aside id='sideBar' role='complementary'>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</aside>
</main>
</body>
</html>