Sizing

Goals

Concepts

In following demos, elements come with 5px padding/gap and 3px colored border.

Case 1: Fit the content

The most compact sizing.
Static
Static
Static
Static
Static
Static
Static
Static

Case 2: Container with specified size

The outmost container is specified with a size of 150x150 px. (Positioning is not discussed here.)
Static
A Static
B Static
C Static
D Static
E Static
F Static
G Static
H Static
I Static
J Static
A Static
B Static
C Static
D Static
E Static
F Static
G Static
H Static
I Static
J Static

Case 3: Weighting

The outmost container is specified with a width of 150%.
weighted
weighted
weighted
 
weighted
weighted
weighted
weighted

Case 4: More complex cases

A Static
B Static
C Static
D Static
E Static
F Static
G Static
H Static
I Static
J Static
canvas