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

php - Creating canonical URLs with custom route-classes -

mysql - Formatting problem with PHP DateTime Difference when used as part of an equation -

Mysql Local server hardware -