html - Witdh div in div use 100% and have padding -
I want to insert a div in another, and that div has a padding of 10px, and this div width is 100 %. But to do this, div goes out of the parents.
Example in jsFiddle here:
. Caixa {float: left; Width: 100%; Background color: white; Padding: 25px; } I have another problem, I have one left to the left with a width of 150px, and there is a device to capture all the space and padding. By default, the CSS box designates the last width of the model element as its width , by default
range and padding . You can remove this deceptive behavior by using box-sizing property: . Caixa {float: left; Width: 100%; Background color: white; Padding: 25px; -MOZ Box-Size: border-box; Box-size: border-box; }
Read about:
Browser Support:
Comments
Post a Comment