Actually there are two tables, one under the other, located in different divs, but in the same container.
How can the window be collapsed so that the corresponding columns of the tables remain proportional to the size?
Ideally, the first cells in width should be xx% of the window width.

http://tarasovych.ho.ua/page/ question concerns td.itogo.commontable and td.col_title.commontable

    1 answer 1

    Alternatively, you can use jQuery.

    function setWidth(){ var itogoWidth=$('td.itogo.commontable').css('width'); $('td.col_title.commontable').width(itogoWidth); } 

    And call this function every time the table or window size changes.

    • And without jQuery, are there options? - Tarasovych
    • one
      On pure js you can use itogoWidth = document.getElementById ("itogo"). Style.width and document.getElementById ("commontable"). Style.width = itogoWidth, but then you have to take them by id. As for the class - I do not remember. Or are you interested in options without js? - Victor Zharikov
    • Yes, without js at all
    • So doesn't js just solve this problem? Track movement and function automatically align. - Victor Zharikov
    • And how to make the above function called when the window is resized? - Tarasovych