- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I am trying to code a table for viewing on smaller devices. To clearly describe what I have and am trying achieve, I have the following jsfiddle.
Does anyone know of a method or tutorial for how to achieve the end result? Searches for “responsive tables” are not yielding the results I would like. Is it possible to give a row flexibility to stack columns?
Well, first off, it’s tabular data, so put it in a <table>
— not div
s.
To get what you want, you can use a media query to make the table rows display as inline-block when the viewport is above a certain size.
I thought using div’s with display properties of tables would offer more flexibility than straight semantic mark-up for tables.
Is there a site to learn advance properties on tables? For instance, display: inline-block on <tr> is not found at w3shools
Thank you for your help. It is exactly the solution I was seeking.