Answers for "stretch text to div width css"

CSS
1

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>
Posted by: Guest on April-19-2021

Browse Popular Code Answers by Language