I am getting some text from the server and adding in quotes to that on the front end using markup. The problem is that sometimes only the end quote gets wrapped onto a new line. How do I prevent this from happening.
I dont mind if the last word gets wrapped along with the quote.
I have tried using white-space: nowrap on the text but I dont know the length of the text beforehand so I dont want it to exceed the width of containing element so white-space: nowrap doesn't work.
Edit:
<div class="quote">
<span class="quote-opening">“</span>
<p class="quote-body">Some famous quote here thats being returned from the server
<span class="quote-closing">”</span>
</p>
</div>
.quote{
.quote-opening{
width: 10%;
display: inline-block;
vertical-align: top;
}
.quote-body{
width: 90%;
}
}
I want to indent only the text and the closing quote to the right with a margin of 10px. Thats why I am trying to do display: inline-block for the opening quote.