Skip to main content

Course

HTML and CSS

HTML and CSSPart 3 of 6 · Chapter 4 of 5

Every Element Is a Box With Four Layers

Set an element to 300 pixels wide, add 20 pixels of padding, and measure it: it is 340. That one behaviour has confused every person who has ever learned CSS, and one line of code fixes it permanently.

Read first: Three Ways In, One You Should Use


Make a free account to read on

Every chapter is free — an account lets your course progress follow you from your laptop to your phone. No payment, no trial.