Creating tables on the web that are also readable on mobile and where you don’t have to scroll sideways can be a challenge!
There is a very good jqurery library that helps a lot, datatables. This gives you functions such as searching, filtering, copying and exporting to Excel and PDF.
This library is used by a ready-made plugin for WordPress, tablepress but if you add it yourself, you can use more functions.
The table can be filtered in the search box and all columns can be sorted. On a mobile, the table is formatted so you don’t have to scroll sideways.
As an added bonus, you can open the table in Excel or copy it!
Nr | First name | Last name | Location | |
---|---|---|---|---|
1 | Kalle | Anka | Ankeborg | |
2 | Nalle | Puh | Sjumilaskogen | |
3 | Mimmi | Pigg | Ankeborg | |
4 | Musse | Pigg | Ankeborg | |
5 | Nasse | ? | Sjumilaskogen | |
6 | Emil | Svensson | Lönneberga | |
7 | Ida | Svensson | Lönneberga | |
8 | Ronja | Rövardotter | Mattisborgen |
Leave a Reply