When addind a css of something like
#mydiv {
width: 100%;
padding: 20px;
background-color: red; /* only for visualization*/
}
<div id="mydiv" >my div<div/>
It will overflow the page.
How can I make this "100 percentage width" not overflow because of the padding?
I don't want to hide the overflow, but I want to make the width a little less than 100%
but without having to hardcode some width.
Something like width: 100% - padding