I want to fit the multiplication table in the body element so that it will stay within the borders of the bode and adjust automatically if the page is resized.
Now it looks like this(the table goes beyond the body borders):
I tried:
display: block;
overflow: auto;
But it did not do anything. I used this post for reference: Div height 100% and expands to fit content
simplified HTML:
<div class="container">
<table id="multTable"></table>
</div>
simplified CSS:
html {
background-color: #9FA5FF;
height: 100%;
}
body {
background-color: #E2E3FF;
margin: 0 auto;
width: 70%;
height: 100%;
}
#multTable {
margin: auto;
height: 200px;
overflow-x:scroll;
overflow-y:scroll;
display:block;
}