My recommendation is to float: left
the sidebar. The headline should then wrap with no problem. It CAN be done, and would be the best route to go, even if the HTML has to be reworked to nest appropriately.
Alternatively, you can use jQuery to accomplish this as well:
$(window).resize(function() {
doc_width = $(document).width();
doc_width = doc_width.replace("px","");
sidebar_width = $("#sidebar").width();
sidebar_width = sidebar_width.replace("px","");
$("#header").css("max-width", (doc_width - sidebar_width) + "px");
});
See if that works for you. Without the actual HTML it's difficult to give a specific answer.