HTML, CSS: the table does not resize the page

I recently uploaded a very simple template for my website.
It contains 1) a simple style.css

and 2) example index.php



When trying to edit this index.php

and add a table, in the area <div class="main_body">

, the main content area (main body) does not resize the page accordingly .
>
However, the page is very easy to resize with tags <p>

, <h1>

etc. The problem only occurs with tables.
Please note that I tried to do this in several ways:

  • #main .main_body {height:auto;}

    code in: style.css

    97th line.
  • table #displayblocktest {display: inline-block;}

    code: style.css

    Second line.

I have downloaded everything at http://jsfiddle.net/48dog2sj/ .

So my question is, what changes do I need to make to resize the page to fit the tables?
Hope someone knows a way around this problem.

+3


source to share


2 answers


The loose align=left

is changing the default wrapper around the table: http://www.w3schools.com/tags/att_table_align.asp . Also, it is deprecated; you have to use CSS float property instead.



Fiddle: http://jsfiddle.net/48dog2sj/1/

+2


source


You need to remove the item align=left

from the table item!



+1


source







All Articles