td content automatically wraps table table td after setting the width too much text automatically wraps

td content automatically wraps table table td after setting the width too much text automatically wraps
Set the table's style="table-layout:fixed;" and then set the td's style="word-wrap:break-word;"

Copy code
The code is as follows:

<table style="TABLE-LAYOUT: fixed" border="1" cellspacing="0" cellpadding="0" width="200">
<tbody>
<tr>
<td style="WORD-WRAP: break-word" width="20">sssssssssssssssssssssssssssssssssssssssssssssssssssssssss </td>
<td>aaaaa</td>
</tr>
<tr>
<td style="WORD-WRAP: break-word" width="20">sssssssssssssssssssssssssssssssssssssssssssssssssssssssss </td>
<td>aaaaa</td>
</tr>
</tbody>
</table>

<<:  Drop-down menu and sliding menu design examples

>>:  CSS style solves the problem of displaying ellipsis when the text is too long

Recommend

How to enable MySQL remote connection in Linux server

Preface Learn MySQL to reorganize previous non-MK...

Simple comparison of meta tags in html

The meta tag is used to define file information an...

Play and save WeChat public account recording files (convert amr files to mp3)

Table of contents Audio transcoding tools princip...

Install CentOS system based on WindowsX Hyper-V

At present, most people who use Linux either use ...

Web design tips on form input boxes

This article lists some tips and codes about form...

How to modify the root password of mysql in docker

The first step is to create a mysql container doc...

The principle and basic use of Vue.use() in Vue

Table of contents Preface 1. Understanding with e...

25 advanced uses of JS array reduce that you must know

Preface Reduce is one of the new conventional arr...

How to use Node.js to determine whether a png image has transparent pixels

background PNG images take up more storage space ...

Example of implementing the skeleton screen of WeChat applet

Table of contents What is a skeleton screen How t...

Various types of MySQL indexes

What is an index? An index is a data structure th...

Detailed explanation of Linux Namespace User

User namespace is a new namespace added in Linux ...

Steps to create a WEBSERVER using NODE.JS

Table of contents What is nodejs Install NodeJS H...

Introduction to Spark and comparison with Hadoop

Table of contents 1. Spark vs. Hadoop 1.1 Disadva...