table plugin add unnecessary height and width
See original GitHub issueWith create a table its add width to every TD
<tr>
<td style="width: 20%;"> </td>
<td style="width: 20%;"> </td>
</tr>
<tr>
<td style="width: 20%;"> </td>
<td style="width: 20%;"> </td>
</tr>
But to set the width in every TD for every TR is not necessary and have no benefits. A cell can’t get different widths in a column. So I would like only in the first TR get the width in TD. When delete the first row, the second row (new first) must inherit the width from deleted one.
The same happen with height in table. After resize a single row, its add it for all TR and TD a height.
<tr style="height: 25px;">
<td style="width: 20%; height: 25px;"> </td>
<td style="width: 20%; height: 25px;"> </td>
</tr>
<tr style="height: 18px;">
<td style="width: 20%; height: 18px;"> </td>
<td style="width: 20%; height: 18px;"> </td>
</tr>
Why tinymce add height to every TR and TD? Why not only TR? Again, a row can’t have different heights in a single row. And why its add height to all TR/TD and not only the single resized one? This feature make extensive tables very big in size.
Is here maybe a function that make the html better?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:5 (2 by maintainers)
Top Results From Across the Web
HTML table with 100% width, with vertical scroll inside tbody
In order to fix that, we have to calculate the width of tbody columns and apply the corresponding value to the thead columns...
Read more >Table Layouts - W3C
Percentages on 'width' and 'height' on the table are relative to the table wrapper box's containing block, not the table wrapper box itself....
Read more >A Complete Guide to the Table Element | CSS-Tricks
Add up the values for each table cell in that table row to get the final value. ... The table element itself is...
Read more >HTML Tables: All there is to know about them - freeCodeCamp
The short answer would be — yes. In order for the browsers to display the table, the HTML table attributes, particularly the HEIGHT...
Read more >Setting Height And Width On Images Is Important Again
However, adding width and height attributes to your <img> markup have ... override the width of the image and constrain it when necessary, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
And why can’t we, even with
table_resize_bars
set to false, prevent table resizing in the first place! I want a nice clean table with NO inline styles!Also worth noting in TinyMCE 5.4 we’re adding better support for tables that have no set widths.