I work for a creative design studio who likes to break paradigms and convention to create unique website layouts and recently we’ve started developing horizontal website layouts. While horizontal website layouts look “cool” I’ve yet to work out how to make them fluid and responsive like you can with a vertical grid based website out-of-the-box.
Normally for a vertical website with a container you’d have a percentage based width on your container element, then set a max-width. With a responsive layout your content infinitely scrolls off of the page, it can vary in width especially if the content is unique and therefore the formula target/context * 100 doesn’t really work (or does it?).
Is there perhaps a way to have responsive heights, padding and margins on elements to make it work just like you would a grid based responsive website. I don’t mind having to use Javascript but a CSS fix would be ideal.
For your reference an example of the type of layout I am trying to create:

You can do this with jQuery by calculating the page container div’s child elements
.outerWidthand adding them all together and appending that to the page or div’s.css('width')HTML structure:
EDIT: I forgot to add the css, but the main point here is you would want the child divs of
#mainto be floating left.Javascript: