Home > Web Front-end > CSS Tutorial > How to solve the problem of too long td? CSS to expand the fixed-width table (picture and text)

How to solve the problem of too long td? CSS to expand the fixed-width table (picture and text)

不言
Release: 2018-07-26 09:40:10
Original
2718 people have browsed it

The content of this article is about how to solve the problem of too long td? CSS realizes the expansion of a fixed-width table (pictures and texts). The content is very detailed. Friends in need can refer to it. I hope it can help. You guys.

Solution:

Add style to the table: 

table{table-layout:fixed;word-break:break-all}
Copy after login

table-layout:fixed The column width of tablle is set by the table width and column width.
word-break:break-all Allows line breaks within words.

Under normal circumstances:

## The td in the table is too long:

##After adding the style:


Related recommendations:

How to hide HTML elements using CSS? Four ways to hide HTML elements

How to implement responsive navigation menu with css and js

The above is the detailed content of How to solve the problem of too long td? CSS to expand the fixed-width table (picture and text). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template