Is there anyway that I can write a css value as mathematical expression? Example:
div{
height: 50% + 30px;
width: 40em - 5px;
}
If t
Both padding
and margin
can be used to add to the dimensions of objects. I suggest you read up on the box model.
HTML:
...
CSS:
.wrapper {
width: 40em;
height: 50%;
padding: 15px 0; /* Top and bottom padding of 15px */ }
/* Block-level element will take up 100% of the
container width, minus {margin_right} + {marign_left} */
.wrapper > div { margin: 0 0 0 5px; }