Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table-auto #7

Open
awb99 opened this issue Oct 14, 2023 · 5 comments
Open

table-auto #7

awb99 opened this issue Oct 14, 2023 · 5 comments

Comments

@awb99
Copy link
Contributor

awb99 commented Oct 14, 2023

No description provided.

@awb99
Copy link
Contributor Author

awb99 commented Oct 14, 2023

table-layout
Possible values: auto, fixed

auto is the default. The width of the table and its cells depends on the content inside.

If you change this to fixed, the table and column widths are set by the widths of table and col elements or by the width of the first row of cells.

@awb99
Copy link
Contributor Author

awb99 commented Oct 14, 2023

Table Layout

Utilities for controlling the table layout algorithm.

Quick reference

Class Properties
table-auto table-layout: auto;
table-fixed table-layout: fixed;
Table Layout Utilities for controlling the table layout algorithm.

Quick reference
Class
Properties
table-auto table-layout: auto;
table-fixed table-layout: fixed;

@awb99
Copy link
Contributor Author

awb99 commented Oct 14, 2023

Above is from tailwind

@awb99
Copy link
Contributor Author

awb99 commented Oct 14, 2023

width of the

element to 100% or the maximum width required, we can make the table scrollable when the screen size or table wrapper becomes smaller than the table’s width, thus preventing the table from distorting the layout of the page:

<style> .table-wrapper { width: 100%; /* max-width: 500px; */ overflow-x: auto; }

@awb99
Copy link
Contributor Author

awb99 commented Oct 14, 2023

Here’s an example of a data table with truncated cells:

th,
td {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
td:first-child {
min-width: 200px;
max-width: 200px;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant