As I understand it, you want your messages to scroll horizontally and sit side by side.
To do this, you need to add an additional shell, for example:
<div id="wrapper"> <div id="contentWrapper"> <div class='post'>Post 1</div> <div class='post'>Post 2</div> <div class='post'>Post 3</div> <div class='post'>Post 4</div> <div class='post'>Post 5</div> <div class='post'>Post 6</div> <div class='post'>Post 7</div> <div class='post'>Post 8</div> </div>
Here's the css to achieve the desired effect:
#wrapper { width:400px; height:200px; overflow: auto; } #contentWrapper { float: left; margin-right: -30000px; } .post { width:100px; height:100px; display:inline-block; }
A working example can be found here: http://jsfiddle.net/QNXmk/1/
source share