Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

<table width="100%"> vs <table style=" width: 100% ">

$
0
0
Post is with respect to datatables and accompanying css version: 1.9.4

So I've encountered some rather weird behavior (fix included).

On my fluid layout page I have a table which gets datatable applied to it, the tables css was defined as:
<table style=" width: 100% ">
what I discovered is that if the style is declared this way and the page is resized to be much smaller than it originally was the table will not resize with the page and will instead start coming out of the right side of the page.

Alternatively, if you declare the tables style as:
<table width="100%">
the table will correctly shrink as much as possible with the page (it will still eventually come out but only at super small sizes, of course that is entirely expected)

Anyways, so that was the problem encountered and the fix I used to get around it; I just wanted to make sure to put that out there just in case someone else wonders about that behavior.

Viewing all articles
Browse latest Browse all 1816

Trending Articles