Home >Web Front-end >Front-end Q&A >What should I do if a word in CSS does not fill a line?

What should I do if a word in CSS does not fill a line?

藏色散人
藏色散人Original
2021-03-22 11:33:302647browse

Solutions to the problem that a word in CSS does not fill a line: 1. Add the "word-break: break-all;" style to the container; 2. Add the "text-align: left;" style to the container.

What should I do if a word in CSS does not fill a line?

The operating environment of this article: Windows 7 system, css3 version, DELL G3 computer

css solves the problem of text falling off without filling a line

Add the following styles to the container:

First type: word-break: break-all; (allow line breaks within words)

No. Two types: text-align: left; (text left aligned)

[Recommended learning: css video tutorial]

The above is the detailed content of What should I do if a word in CSS does not fill a line?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn