I'm pushing some text with blank lines (from a Database) inside a p element:
<p className={styles.biography}>{loaderData.cast.biography} </p>
.biography {
font-size: 1.4rem;
color: #333333;
text-align: justify;
}
However the blank lines aren't being displayed. E.g., this is the start of the text retrieved from the Database:
to stay new and fresh even after over four decades in the business.
Downey was born April 4, 1965 in Manhattan, New York....
Which is displayed as:
I tried changing the P to DIV but same problem. Any advice on how to display the empty lines from the data in the output P with css?
` but put a class on it, then use CSS to style that `p.yourclass` to use `pre-wrap` or `pre-line`
– Stephen P Aug 11 '23 at 16:37