0

I have this container and I want it to be rendered like this:

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nulla ac neque sed velit aliquet molestie. Duis ut
magna euismod, convallis tellus... Read More.

I've tried this. It worked for the text but regarding the link, it's just displaying on another line obviously. Also the link should be kind of a part of the text but if I add the anchor element inside the paragraph element it'll hide it since now it's part of the text.

.text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
}
<div class="container">
  <p class="text">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac neque sed velit aliquet molestie. Duis ut magna euismod, convallis tellus non, molestie risus. Aenean lacinia nisl eget tincidunt bibendum.
  </p>
  <a href="#" class="read-more">Read More</a>
</div>
isherwood
  • 58,414
  • 16
  • 114
  • 157

0 Answers0