I had the same problem and fixed with this:
$(window).resize(function () {
$('#category-nav.affix').width($('#content').width());
});
basically in an event of resize I calculate the content div's width and set the width of affixed element to that.