$(window).on('load resize', function(){
var sum = 0;
$('.post').each( function(){ sum += $(this).width(); });
$('.row').width( sum );
});
And the .row is getting the correct width, BUT, the last two .posts drops down under the first four, just like if the container width was 100% (or 100vw).
Anyone now how this can be fixed? How can I force the posts to line horizontal?
Overflow auto means it will give you scrollbars when it NEEDS to give you scrollbars. You are setting (in javascript) the row element to be equal to the width of all the posts. So why would it give you scrollbars? No element is overflowing outside of the width of .row. You are MAKING it so the width matches the width of all hte inner elements.
If your .row is supposed to be set to the huge width (1195px for me) then just set overflow:hidden; completely for .row and then on .row-wrapper set the overflow-x auto; there.