Get second line of bullet item to indent as first part – not underneath the bullet?

My take on this would be to include the bullet in another div and then wrap both divs in a container div.

.row2 {
    padding-left: 20px;
    overflow: hidden;
    max-width: 500px; 
}
.red-square-5 {
    position:absolute;
    width:5px;
    height:5px;
    margin-top: 0.5em;
    background:#f00; 
}
<div class="container-div">
    <div class="red-square-5"></div>
    <div class="row2">
        Long long long long long long long long long long long 
        long long long long long long long long long long long 
        long long long title
    </div>
</div>

And this would be the solution using unordered list, as seen here: How to set Bullet colors in UL/LI html lists via CSS without using any images or span tags

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  padding-left: 1em; 
  text-indent: -0.8em;
}

li::before {
  content: "■ ";
  color: red; /* or whatever color you prefer */
}
<ul>
  <li>Long long long long long long long long long long long long long long long long long long lng long long long long long long title
  </li>
</ul>

Leave a Comment