Detailed explanation of compatibility issues and solutions for setting max-width and min-width in table

Detailed explanation of compatibility issues and solutions for setting max-width and min-width in table

Setting min-width and max-width properties in table

<table>

 <tr><td>1</td><td>2</td></tr>

</table>

table{min-width:60%;min-width:100%;}

But Chrome is not compatible with max-width, and IE7 is not compatible with either.

Solution: Wrap a div around the table and set min-width and max-width on the div

<div class="table-wrap">

 <table>

  <tr><td>1</td><td>2</td></tr>

 </table>

</div>
.table-wrap{width:500px;min-width:60%;min-width:100%;}

.table-wrap table{width:100%;}

This is the end of this article about the compatibility issues and solutions of setting max-width and min-width in table. For more relevant table max-width and min-width content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

<<:  About the pitfalls of implementing specified encoding in MySQL

>>:  Tips for efficient use of CSS style sheets: Take full advantage of the power of style sheets

Recommend

Linux centOS installation JDK and Tomcat tutorial

First download JDK. Here we use jdk-8u181-linux-x...

How to write configuration files and use MyBatis simply

How to write configuration files and use MyBatis ...

Vue3 navigation bar component encapsulation implementation method

Encapsulate a navigation bar component in Vue3, a...

JavaScript implements select all and unselect all operations

This article shares the specific code for JavaScr...

Tkinter uses js canvas to achieve gradient color

Table of contents 1. Use RGB to represent color 2...

The implementation principle of Tomcat correcting the JDK native thread pool bug

To improve processing power and concurrency, Web ...

Summary of knowledge points about events module in Node.js

Through the study and application of Node, we kno...

Implementation script for scheduled database backup in Linux

Table of contents Scenario: The server database n...

Detailed explanation of the basic implementation principle of MySQL DISTINCT

Preface DISTINCT is actually very similar to the ...

How to clear default styles and set common styles in CSS

CSS Clear Default Styles The usual clear default ...

Reasons for the sudden drop in MySQL performance

Sometimes you may encounter a situation where a S...

Analysis of the usage of Xmeter API interface testing tool

XMeter API provides a one-stop online interface t...

Vue implements start time and end time range query

This article shares with you how to query the sta...