Flexbox side-by-side image and text
Image box and text box
See also Flexbox 2 »
The image is 640px wide, the maximum. It can be less but its 'containing' box is never less than 450px wide. This box expands sideways towards the image, up to 50px or 30px away depending on the screen width. It can shrink, but never less than 360px wide, at which point it slips below the image, both centralised (eg: on a mobile phone).
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. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
End flexbox resume normal service
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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
The basic markup for flexbox 1:
</div><!-- stop col //--> <div class="flexcontainer1 row"><!-- or rowreverse as desired //--> <div class="box1"> <div><img src="img/640px-wide-image-filename.jpg" class="bgleft4" alt=""></div> </div> <div class="box2"> <h5>H5 heading text</h5> Normal text </div> </div> <div class="col"><!-- restart col //-->
Maximum image width: 640 pixels. class="bgleft4" is a style class specially for images in 'flexbox 1' with a width of at least 500 pixels. bgleft0–9 are different colours.