I have a web page that displays a pdf document. In the header there is an image and an h1 tag that contains a name. When the name is too long, it gets cut off. How can I force it to wrap to the next line instead so that the entire name is displayed? I tried inserting a style="white-space:normal"
but it doesn't help. Any suggestions?
You can force long (unbroken) text to wrap in a new line by specifying break-word with the word-wrap property. For example, you can use it to prevent text extending out the box and breaking the layout. This commonly happens when you have a long URL in the sidebar or comment list.
It should have the combination of two: word-wrap: break-word; white-space: normal; thanks to Tor and Alex :) Show activity on this post.
word-wrap:break-word;
It should have the combination of two:
word-wrap: break-word;
white-space: normal;
thanks to Tor and Alex :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With