Responsive extension adds a fixed width
Responsive extension adds a fixed width

I've a simple, 3 column table within a page using the HTML Kickstart CSS framework.
When I enable the Responsive extension, a new, inline style element is added to the table, with a width setting equal to the current width of the table. When the window is resized the Responsive behaviour kicks in, but the table remains the same, fixed width.
For example:
With Responsive: false
<table id="presentations" class="display dataTable no-footer" role="grid" aria-describedby="presentations_info">
With Responsive: true
<table id="presentations" class="display dataTable no-footer dtr-inline" role="grid" aria-describedby="presentations_info" style="width: 950px;">
The width:950px remains regardless of the width of the viewport.
Is there a way to make the width: 100% ?
Thanks,
Mark
This question has an accepted answers - jump to answer
Answers
Hi Mark,
Add
style="width: 100%"
orwidth="100%"
as an attribute to yourtable
. You might havewidth: 100%
in your stylesheet already, but it is virtually impossible for DataTables to read a relative value from the stylesheet - hence that requirement.Allan
Thanks @allan
Much appreciated.
Mark