In fact - it is! (with css3)
width: calc(100% -150px);
width: -moz-calc(100% - 150px);
width: -webkit-calc(100% - 150px);
works, but only for the most modern browsers... caniuse
If you dont want to use this, you can use margin to create an offset: margin-left:150px;
. This however needs a parent-element with 100% width and your image to be a block-level element (display:block
).
Another option is to use box-sizing. This lets you choose another box-model which doesn't calculate margins and paddings into the element-width. This helps in some typical "i need 100% width - Xpx border" cases too.
In response to @BerkerYüceer's comment - you can also use dynamic values within the calc like following:
/* declare css variable */
--leftmargin:150px;
/* use the variable like following */
calc(100% - var(--leftmargin));