logmr.com

日志先生-记录有趣的事

The width of the table column doesn’t match what we define in the colgroup in Safari

First of all, you need to make sure that specify this property for the table in the CSS

table-layout: fixed

Secondly, define this class in CSS

.fix-display-safari {
display: block !important;
}

then in Javascript/Typescript file, do the following

root.addClass("fix-display-safari");

root.removeClass("fix-display-safari", 100);

That way it would force the browser to recalculate DOM, and it would fix the width issue.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *