to make it simple, i've got following code:
<div>
<a>view all your links</a>
</div>
the width of the div is very small so the text "all your links" sticks out of the div. how do i do to have a new line after "all your" so "links" dont stick out?
If you want to break links visually so they don't extend out of a div, you can add word-wrap: break-word
to a
in your stylesheet. Thus:
a {
word-wrap: break-word;
}
You have not specified your desired result. Do you want the div to resize to accomodate the entire width of the links? If so, don't put a fixed width on it or any of its ancestor elements. Do you want the overlong links to be cut off? If so, put overflow: hidden
in the style of the div.
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