• Welcome to the eight blog of that year. I am very glad to meet you at the right age.
  • The little buddy who has logged on QQ due to the theme shows the default head in the comments. Please go to the personal center to upload the avatar again.

Solutions to block level elements such as div and P overflow in numbers, English and links.

Code Notes Barben 3 months ago (04-12) 137 browse 0 comments

Origin of problem

Yesterday, the manager suddenly called on me, saying that there was a style in the project that was blown up and never changed automatically.

I went to look at it, and I found it strange that the automatic line changing is normal in the case of normal Chinese input. How can a longer link be able to overflow itself?

Tossing course

After many times, Baidu...
P tag automatic wrap   Use Baidu Search
The links in the P tag do not wrap.   Use Baidu Search
Look at it again. Overflow Property...

Did not get the answer, as if the key words are so wrong!!! What can I do? I have no choice.


Finally, the problem was discovered.

Unlike Chinese characters, a continuous number or English alphabet does not automatically line wrap as you define a wide box.

So you need to use the CSS style to solve this problem so that they can force the wrap.

 Word-wrap: break-word;

Set this style to the corresponding labels in the code!!!

Eight this year's blog, we've been there.
If the author does not indicate the original article, please indicate the link and source.
Digital, English and link overflow elements such as div and P block level elements - https://www.barben.cn/code/424.html
Love ( Eight )

You must Sign in To comment!