answersLogoWhite

0


Best Answer

The box-sizing property is an under-appreciated property in CSS3. It accepts only three values, and yet it's benefit to web designers is enormous. The three values are content-box, border-box, and inherit. The browser default is content-box, which is what web designers are use to now. The padding and borders are rendered outside the specified width and height, so an element with a width of 20px with a 1px border and 5px of padding will actually be rendered as 32px wide (20 + 1 + 1 + 5 + 5). By telling the browser to use border-box, the padding and borders are rendered inside the element. So, our example from earlier would be 20px wide total, with 10px of that element taken up by padding and another 2px taken by borders. To achieve this, your CSS code would look like:

div.subsection {

border: 1px solid #000000;

margin: 2px;

padding: 2px;

width: 50px;

height: auto;

box-sizing: border-box;

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you use the CSS3 property box-sizing?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you put wavy underlining on a word in a webpage maybe using CSS3?

CSS is not capable of doing that. You will need to use an image of some sort.


What is latest version of css?

The latest version of css is css3


What is the latest version of css?

The latest version of css is css3


How can make the rounded box in css?

Using CSS3 capabilities you can use the {border-radius:?px} property. You can change individual corners radius using topleft, topright, bottomleft, bottomright as follows: {border-radius-topleft:?px} etc. At the time of writing (Sept 2010) this capability is only supported in browsers which use the -moz- and -webkit- prefix as follows: {-moz-border-radius:?px}. The upcoming IE9 will hopefully support this capability.


How do you round div corner in CSS?

In CSS3 we will be able to do this easily using the border-radius property. In most modern web browsers (Internet Explorer being the notable exception) you can achieve a rounded corner (or rounded corners) by using the border-radius property. To do this, in your CSS you would use: border-radius: 15px; It is important to note that IE doesn't support this and so people using IE will not see a round corner. This may or may not be important depending on the purpose for the rounded corners.


Who uses the newest web technology?

Any web designer that uses CSS3 and HTML5 will be up to date on web technology.


How many tag css css3 in HTML?

You can apply as many tags as you want. The CSS tags apply style to the content


How do you name the property of addition?

Use These Property'sAssociative Property Of AdditionCommutative Property Of AdditionAdditive identity Property


How do you use the word property in a sentence?

The property is for sale. A property of water is that it is a liquid.


Can you use the Associative Property with subtraction and division?

No you can not use subtraction or division in the associative property.


What property of multiplication do you use to rename fractions?

Identity property of multiplication


which property can you use t prove that IF....?

reflexive property of congruence