maybe this helps:
$('#element').animate({ "width": "-=278px" }, 800);
every time this script will remove 278px from the element
edit: Try this it will recalculate when the window is resized. If i understand you correctly that should help.
$(window).on("resize",function(){
$('#element').css("width",$('#element').width()-275+"px");
});
CSS3 option
Since CSS3 has an animateion function you could also use this:
#element{
-webkit-transition:all 500ms ease-out 0.5s;
-moz-transition:all 500ms ease-out 0.5s;
-o-transition:all 500ms ease-out 0.5s;
transition:all 500ms ease-out 0.5s;
}
If you want to animate the element. And you could do this:
$('#element').css("width","calc(100% - 100px)");
In this case the CSS will do the animation.
Please notice that this will not work for older browsers