Reputation: 3
This is my first question ever on StackOverflow. Up until today, I was always able to find solutions to my problems on this website, but this time I have to call for help.
I need to display a text from a database. This text includes line breaks (not <br>
, just a blank return - that's how it's saved in the database). This text is justified. I have no problems on Chrome or Firefox, but on Safari the last line of each paragraph (or block of text to be exact) is also justified, creating wide spaces between words.
The weird thing is that when I highlight the text with the cursor, the last line of each paragraph goes to the left.
I applied text-align-last: left;
but it does not change a thing on Safari. I also tried -webkit-text-align-last: left;
but i was unsuccessful.
The text is in a <p>
, I tried to put it into a <div>
instead, but no change.
.quoteText {
font-family: Georgia;
font-style: italic;
font-size: 18px;
margin-top: 20px;
margin-left: 3%;
margin-right: 3%;
}
.justified {
white-space: pre-line;
text-align: justify;
text-align-last: left;
}
<p class="quoteText justified">
How often since then has she wondered what might have happened if she'd tried to remain with him; if she’d returned Richard's kiss on the corner of Bleeker and McDougal, gone off somewhere (where?) with him, never bought the packet of incense or the alpaca coat with rose-shaped buttons. Couldn’t they have discovered something larger and stranger than what they've got. It is impossible not to imagine that other future, that rejected future, as taking place in Italy or France, among big sunny rooms and gardens; as being full of infidelities and great battles; as a vast and enduring romance laid over friendship so searing and profound it would accompany them to the grave and possibly even beyond. She could, she thinks, have entered another world. She could have had a life as potent and dangerous as literature itself.
Or then again maybe not, Clarissa tells herself. That's who I was. This is who I am--a decent woman with a good apartment, with a stable and affectionate marriage, giving a party. Venture too far for love, she tells herself, and you renounce citizenship in the country you've made for yourself. You end up just sailing from port to port.
Still, there is this sense of missed opportunity. Maybe there is nothing, ever, that can equal the recollection of having been young together. Maybe it's as simple as that. Richard was the person Clarissa loved at her most optimistic moment. Richard had stood beside her at the pond's edge at dusk, wearing cut-off jeans and rubber sandals. Richard had called her Mrs. Dalloway, and they had kissed. His mouth had opened to hers; (exciting and utterly familiar, she'd never forget it) had worked its way shyly inside until she met its own. They'd kissed and walked around the pond together.
It had seemed like the beginning of happiness, and Clarissa is still sometimes shocked, more than thirty years later to realize that it was happiness; that the entire experience lay in a kiss and a walk. The anticipation of dinner and a book. The dinner is by now forgotten; Lessing has been long overshadowed by other writers. What lives undimmed in Clarissa's mind more than three decades later is a kiss at dusk on a patch of dead grass, and a walk around a pond as mosquitoes droned in the darkening air. There is still that singular perfection, and it's perfect in part because it seemed, at the time, so clearly to promise more. Now she knows: That was the moment, right then. There has been no other.
</p>
I expect the whole text to be justified, and the last line of each block of text to be aligned to the left. Again, it works on Chrome and Firefox, but not on Safari.
Upvotes: 0
Views: 2364
Reputation: 127
Actually, it's not supported by Safari. Please check for reference: https://developer.mozilla.org/en-US/docs/Web/CSS/text-align-last
Upvotes: 4
Reputation: 4638
Its not compatible with safari
before using any new css property please check those with caniuse
Upvotes: 1