I have an element with a 70% width, and it is floating beside an element with 30% width, but when I add 25px
of padding it expands the element and breaks the format, is there any way to make it just increase the contents distance from the edge as opposed to just making it bigger?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- Adding a timeout to a render function in ReactJS
When you use the
border-box
model, the padding is included in the box size. See here for details.I would create another element of the same type (may I guess it's a div?) inside the element and set that one to have a padding/margin of 25px.
For example: