Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Textile for tables on responsive sites
Hi,
I use often tables and to get it mobile friendly I use an extra div to fit longer tables to the screen of smaller devices with a css like this: div.tablediv {overflow-x:auto}
and the code goes like this
<div class="tablediv">
|^.
|_<. header|_<>. header|_<>. header|
|-.
|<. text |<>. some text |<>. more text|
...
</div>
The question is, if there is a textile inherent way to get the same result? Somehow it is actually more like a workaround.
Offline
Re: Textile for tables on responsive sites
Can you apply the class directly to the table or does it need to be a wrapper? Otherwise:
table(tablediv).
|^.
|_<. header|_<>. header|_<>. header|
|-.
|<. text |<>. some text |<>. more text|
...
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Textile for tables on responsive sites
It should be a wrapper. So probably, there is no “textile way” to do this.
Offline
Re: Textile for tables on responsive sites
Probably not then. Textile doesn’t support div
as a block level shortcut since it’s only five/six characters and not really a content formatting construct, more layout. I know there are some anomalies and blurred edges in Textile, but that’s the core concept behind it.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Textile for tables on responsive sites
You can use JavaScript to append a container around a table maybe.
Offline