How tables should be handled on different screen sizes?
Yesterday, I tried to resize Chrome browser window in width, but table haven't changed in any way. Is it possible, to somehow modify table presentation for different screen sizes? Maybe there is some upcoming plugin for that or maybe it can be achieved with plain CSS. I'm not a designer, therefore I can't say for sure, what approach would be better. But I gues it is duable.
This is what you might be looking for http://css-tricks.com/responsive-data-table-roundup/
I am working on something like this in combination with bootstrap
Put your tables inside of a "row-fluid" and watch it shrink in width. To achieve more customization (font-size, layout, etc.), you'll have to create your own CSS to handle that.
@sannefoltz yes, exactly that. I see that as an only solution for viewing on devices with smaller screen size if you don't want to scroll.
@BenjiZombie so it can be handled just with CSS ( no Javascript needed for that ). Okey. So maybe it is worth placing it in bootstrap? Sure I can do it ( probably ) myself, but since it is a bootstrap and it allows to work with different screen sizes, it should be compatible with all that is purposed already ( tables included ).
Problem is, you could have different types of content in a table (images, controls, iframes, etc.) and not only text, so creating a general responsive design would be difficult IMO. But if it's only text, than sannefoltz's solution might be the way to go.
I think, that it should be done mainly for text and if there should be anything else, then user of bootstrap will be responsible for implementing it for anything else. At least, that is what I think.
Customizing tables to be responsive has been proposed before, but I've yet to see an elegant solution that works uniformly. In some cases, not all content is appropriate for every device and resolution—tables are a grab-bag and if you look through the BS docs on your phone, you'll see why.
We won't be adding anything to the BS core for this.
I'm doing so:
.table {
td, th {
word-wrap: break-word !important;
word-break: break-all !important;
}
}
I know that this is ugly, but it works.
:dancers:
Nowadays, there's .table-responsive, which adds horizontal scrolling but doesn't fundamentally alter the formatting of the table.