Explore 100's Of Free Video Tutorials

Keep Learning, Keep Coding & Keep Sharing

CSS

CSS box model - Part 2

Notes:

CSS Box Model - Part 2

Calculating actual width and actual height of an HTML element:

HTML element's actual width:
is the amount of space occupied by an HTML element horizontally

actual width of an HTML element =
content width + left padding + right padding + left border + right border + left margin + right margin

HTML element's actual height:
is the amount of space occupied by an HTML element vertically
actual height of an HTML element =
content height + top padding + bottom padding + top border + bottom border + top margin + bottom margin

Interview Questions: