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: CSS: And here's the answer: & lt; Div class = "wrapper" & gt; & Lt; Div class = "inner" & gt; & Lt; / Div & gt; & Lt; / Div & gt;
. Warper {Padding-right: 10px; }
Comments
Post a Comment