css - Subtracting an exact amount of pixels from a relative value -


In my CSS, I need to create a div width 100% - 10px. Is it possible? if so, how?

Very straight forward and simple.

It is not possible in CSS that you simply can not calculate in CSS. You have to trust Javascript for this.

If you need absolutely to work through CSS, then you should wrap it in a single padding with a padding.

HTML: & lt; Div class = "wrapper" & gt; & Lt; Div class = "inner" & gt; & Lt; / Div & gt; & Lt; / Div & gt;

CSS:

 . Warper {Padding-right: 10px; }   

And here's the answer:

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -