content-box vs border-box at the same width
Input: width: 200px, padding: 20px, border: 5px
Output: content-box total: 250px (200 + 40 + 10). border-box total: 200px (padding/border absorbed into width).
500+ fast, free tools. Most run in your browser only; Image & PDF tools upload files to the backend when you run them.
Visualize the CSS box model interactively — adjust margin, border, padding, and content size to understand element dimensions.
The CSS Box Model Visualizer provides an interactive diagram of the CSS box model — the layered system of content, padding, border, and margin that determines how every HTML element is sized and spaced. Adjust each dimension using sliders or number inputs and see the box update visually in real time. The tool labels each layer with its current size and calculates the total element dimensions (width and height including padding and border, accounting for box-sizing: border-box vs content-box). This is an essential learning tool for CSS beginners and a useful sanity check for developers debugging layout issues.
Input: width: 200px, padding: 20px, border: 5px
Output: content-box total: 250px (200 + 40 + 10). border-box total: 200px (padding/border absorbed into width).
Input: padding: 16px 24px 12px 24px
Output: .card { padding-top: 16px; padding-right: 24px; padding-bottom: 12px; padding-left: 24px; }
Input: Two siblings: margin-bottom: 20px and margin-top: 30px
Output: Visible gap is 30px (the larger), not 50px — vertical margins collapse between siblings.
Input: Width 320, padding 16, border 1, content-aware
Output: .btn { box-sizing: border-box; width: 320px; padding: 16px; border: 1px solid #333; }