Hi all,
I have a DIV section that would like to use it as a "component" in a variety of contexts. For "component", I mean it will be automatically included in some places of the HTML page that could not be foreseen.
The required behaviour of the DIV section is that it's width should be always 100%, meaning it should totally fill the parent. A problem appears because of the fact that the total width of DIV is sum of inner width + paddings + margins. My paddings for the DIV section are:
padding-left: 10px;
padding-right: 10px;
The question is: how am I supposed to set the width of the DIV section when I don't know the width of the parent, but want to be 100%? There isn't something like 100% - 2 * 10px...
Preferrably, I wouldn't use javascript or JQuery for this kind of layout problem.
Thanks in advance,
Zlatko