When you set width with css
method twice in a row the second simply overwrites previous. In your case to mimic 100% - 90px
width you need to actually calculate this difference in px
and apply the result.
Now, percentage width 100%
is calculated relatively to a parent container, it means that for 100% value you need to do something like this:
var paxWidth = $('.pax').width() + 10;
$('.datetime, .placeholder').css('width', function() {
var parentWidth = $(this).parent().width();
return parentWidth - paxWidth;
});
Demo: http://jsfiddle.net/02cxqpzq/
UPD. Looking at duplicated answer, I can confirm that my above solution makes little sense since it can be as simple as
$('.datetime, .placeholder').css('width', '100%').css('width', '-=90px');
Demo: http://jsfiddle.net/02cxqpzq/1/