This might be quite simple but I can't make it work. I need to add quotes to a paragraph that should be limited to 2 lines. And is showing as picture
or
“
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis porta enim, et pulvinar erat
”
I would need to remove the new line after de first quote and before the last one to get something like this:
“ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis porta enim, et pulvinar erat ”
Here's the code:
<blockquote className="mt-6 subtitle-2-regular">
“<p className="line-clamp-2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis porta enim, et pulvinar erat</p>”
</blockquote>
Please help. Thanks!
PS: I'm using tailwind's line-clamp extension to limit the lines to 2.
CodePudding user response:
<p>
tag has display: block by default so it will be on a new line.
I would suggest you to put your quotes inside of the <p>
.
Similar to this:
<blockquote className="mt-6 subtitle-2-regular">
<p className="line-clamp-2">
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis porta
enim, et pulvinar erat"
</p>
</blockquote>
CodePudding user response:
One of the solutions is making the quotes be inside of the <p> tag
Or if u also want to cite anything is add a <q> tag inside the <p> tag.
As the example of below.
<blockquote className="mt-6 subtitle-2-regular">
<p className="line-clamp-2"><q>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis porta enim, et pulvinar erat</q></p>
</blockquote>