Responsive Tables in Bootstrap-based themes

17 views
Skip to first unread message

Kevin Sheppard

unread,
Sep 3, 2019, 7:02:14 PM9/3/19
to nikola-discuss
Is there any reasonable method to make tables responsive?  The standard apprach is to wrap the table in a div.

<div class="table-responsive">
  <table class="table">
    ...
  </table>
</div>

The code generated does not wrap the table in any div so it is not a simple question of copying the css of table-responsive to a new div class.

I don't want to use javascript.  Is there any way to get the table wrapped, short of writing HTML?

Thanks,
Kevin

Roberto Alsina

unread,
Sep 3, 2019, 7:05:55 PM9/3/19
to Nikola—Discuss
It depends a little on what markup you are using, but usually they are not very flexible about how they generate that.

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/845fddc1-69cd-4770-9afc-2860f2e10780%40googlegroups.com.

Marcelo Huerta

unread,
Sep 6, 2019, 4:24:08 PM9/6/19
to nikola-discuss
If you use reST maybe you can use the container directive:

.. container:: table-responsive

   
.. csv-table:: Table
     
:class: table

     
Title1, Title2, Title3
     
1,2,3
     
4,5,6
     
7,8,9
Reply all
Reply to author
Forward
0 new messages