make width of div fit content code example
Example 1: css width fit to content
width: fit-content;
Example 2: make div the size of the text inside
div {
display: inline-block;
}
Example 3: css div width fit content
display: inline-block;
width: fit-content;
div {
display: inline-block;
}
display: inline-block;