How does css divide div equally

how to achieve these two effects
A: there is a gap between three small div, and there is no
B: a div with a split line in the middle

.
Mar.16,2021

use flexible layout first, and use margin if display: flex;justify-content: space-between; wants to fine-tune.
use pseudo elements for the second, either after or before.

Portal flexible layout


suggest you refer to the flex layout
flex layout:

CSS:before and after


take a look at flex: http://www.ruanyifeng.com/blo.

Menu