EDIT: reading more about subpixel rendering, I learned that CSS values which result in decimal or partial pixel values are not "browser-friendly". Therefore, values should be set to have decimal places!
I am calculating the width of my parent element (.container) through summing the width of all child elements (.project). So far I tried this, but it doesn't work. Can anybody help me out?
For example: when I have five child elements at which each has a width of 363.667px I would like to get a width of 364px.
HTML Markup
<div class="container">
<ul id="projects">
<li class="project"></li>
<li class="project"></li>
<li class="project"></li>
<li class="project"></li>
<li class="project"></li>
<li class="clear"></li>
</ul>
</div>
jQuery
$(window).on( "resize", function () {
var width = ( $(window).width() / 3 );
$(".project").css({ width : width.toFixed() });
var sum = 0;
$("#projects .project").each( function(){ sum += $(this).width(); });
$(".container").width( sum );
}).resize();