Fit column (css)

If I put a table that would naturally be 800 pixels wide in a div, which would be 700 pixels wide, even with the css value set overflow:scroll;, the table would still be "crushed" into 700px space.

Is there any html or css that I can edit / reverse engineer to fix this?

+3
source share
3 answers

verify that this can solve the problem

table
{
table-layout:fixed;
}
+2
source

this will be your required markup

<div style="width:700px; height:300px; overflow:auto; border:1px solid red;">
    <table width="800" border="1">
        <tr><td> Col 1 </td> <td> col 2 </td></tr>
    </table>
</div>
0
source

http://jsfiddle.net/6J9AB/1/

, - ?

800 ? ( 800px ?)

0

Source: https://habr.com/ru/post/1777642/


All Articles