-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tables cannot be set to 100% width #175
Comments
Tables are a bit hacky in Material, due to the way overflow is handled on small screens. I will investigate, but it may take some time. Just setting the table to 100% doesn't do the trick, obviously. |
I hoped that adding custom stylesheet through |
I refactored table styling in #185. Setting tables to full-width is now as easy as: .md-typeset__table {
min-width: 100%;
} However, doing this you lose one thing: the right padding on overflowing tables on mobile - the red area will not be there anymore, thus resulting in the table having no right padding when overflowing: The default way how tables behave is unaltered, so there are no changes for users that don't override |
Closed the issue again, duh. I reopen it and leave it open until it is released. |
Great! I'll try it out then back in office on monday. |
Fix released in 1.1.0 |
It's really as easy as adding following lines to .md-typeset__table {
min-width: 100%;
} In Chrome I had to clear the browser cache to see the change take effect. I like it! Thanks a lot @squidfunk |
This is almost certainly not related to Material but to your |
Is there a reason why the suggested fix can't be applied in the base theme only for non-mobile devices? |
Hi. This fix used to work with 4.6.3 but now that I upgraded to 5.1.1. seems broken again. Any recommendation on how to get the 100% width tables with 5.1.1 ? Thanks |
In your
|
Thanks. To be clear for others, it worked properly when both are in extra_css:
|
The table's CSS class has a weird behaviour, they do not get full width. Check this squidfunk/mkdocs-material#175 (comment). This commit will make all tables in our doc to be full width.
The table's CSS class has a weird behaviour, they do not get full width. Check this squidfunk/mkdocs-material#175 (comment). This commit will make all tables in our doc to be full width.
Based on this issue: squidfunk/mkdocs-material#175
How can I make the generated tables have the same width as other boxes - e.g. use all the space until the green line in screenshot below
Cheers
Tset
The text was updated successfully, but these errors were encountered: