Question discussion

An HTML element has the CSS rules width: 200px; padding: 10px; border: 5px solid; margin: 20px; with the default box-sizing. The width of i…

1974Medium DSSSB TGT Computer Science 0 replies 1 views
0

An HTML element has the CSS rules width: 200px; padding: 10px; border: 5px solid; margin: 20px; with the default box-sizing. The width of its rendered box (content + padding + border, excluding the margin) is

  • A200px
  • B270px
  • C250px
  • D230px
Correct answer: D

Explanation

With content-box sizing the width of 200px applies to the content only, so the box is 200 + 2 x 10 + 2 x 5 = 230px wide (270px would include the margins).

Discussion 0

Nobody has replied yet. Start the discussion!