how to make div take width according to its text code example
Example: 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>