How can i add my margins and paddings to my height and width without changing the %
example:
height: 100%;
width : 100%;
margin-left:10px;
how can the margin be included in the calculation of width and height?
border-box?
How can i add my margins and paddings to my height and width without changing the %
example:
height: 100%;
width : 100%;
margin-left:10px;
how can the margin be included in the calculation of width and height?
border-box?
You may include padding and borders in the width/height but not margins. Margins are the area outside the element and thus the element can not claim the ownership of margins.
You can't use margin or paddings without some width or height, you must have some content inside your tag. If you can't change css just give some min-height/min-width in px or give a content. Here is an [example][1]
[1]: http://codepen.io/ostinred/pen/jPQBRW