adjust text to div width css code example
Example 1: make div the size of the text inside
div {
display: inline-block;
}
Example 2: stretch text to div width css
div{
background-color:gold;
text-align:justify;
}
span{
background-color:red;
width:100%;
height:1em;
display:inline-block;
}
<div>
Lorem ipsum sit dolor
<span> </span>
</div>