I'm trying to create a responsive layout in which two boxes sit next to each other if the screen size allows it, and have them below each other if it doesn't. If the boxes are below each other, I'd like them to be centred to their parent. I've set up a jsfiddle to demonstrate the problem:
http://jsfiddle.net/leongersen/KsU23/
width: 50%;
min-width: 350px;
max-width: 100%;
Try resizing the 'result' pane to below 350px. The elements will overlap their parent.
My question:
Why isn't the specified max-width honoured, even though it comes after the min-width?
max-width: 350px; min-width: 50%
without anywidth
set. See this fiddle. – ScottS