Search code examples
javascripthtmlweb

how to changed font size that table to fit div


I have html

<div style="width: 1000px;">
  <table >
  ...
  </table>
</div>

Table is very large and not all fields fit into div. How to automatically reduce the text to the entire table is placed in a div?


Solution

  • If I understand your question right, you're trying to fit text into a table and change font size according to the table size. This would require working with em or %.

    There's a great article on A List Apart. You should check that out.

    Also; add a Stylesheet Reset to ensure everything looks the same in different browsers.