Skip to content
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

Table overflow issue #664

Open
zishanj opened this issue Feb 7, 2023 · 12 comments
Open

Table overflow issue #664

zishanj opened this issue Feb 7, 2023 · 12 comments
Labels

Comments

@zishanj
Copy link

zishanj commented Feb 7, 2023

We have issue with the table layout where it get overflows the width:

image

overflow-x: initial;
needs to be removed as it overrides the overflow-x of class .table-responsive from auto to initial effecting the table responsiveness.

@danmarsden
Copy link
Owner

Hi there, what version of moodle are you using? Also please keep in mind we only test and support the core themes. If you have a problem with a 3rd party custom theme you may need to resolve this issue within your theme rather than the attendance code.

Can you reproduce the same issue with the core boost theme?

@zishanj
Copy link
Author

zishanj commented Feb 7, 2023

Yes its boost theme on latest 4.1.1.

@danmarsden
Copy link
Owner

thanks - I can see this now when I set a background image in the boost settings - unfortunately removing the overflow-x: initial breaks the sticky header on the table (see #559) - I'm not sure if I will have time to look into this, but feel free to suggest other fixes. pinging: @t-schroeder - have you seen this before too?

thanks!

@danmarsden danmarsden added the bug label Feb 7, 2023
@zishanj
Copy link
Author

zishanj commented Feb 8, 2023

Headers are already sticky with

position: sticky;
. We only have to include overflow-y: auto and limit the height of parent div (if its really needed) so it will make the vertical scrollbar appear.

@zishanj
Copy link
Author

zishanj commented Feb 8, 2023

Other option is to use javascript extension for bootstrap which will detect the page scroll and makes the header sticky when its about to hide above the container.

@danmarsden
Copy link
Owner

Thanks - I'm not a fan of using JS to do this sort of thing and would prefer a css-based solution, but feel free to submit a pull request with the change for me to review!

thanks!

@t-schroeder
Copy link
Contributor

Admittedly I hadn't tested this with a different background color. Another fix would be to just make the table cells non-transparent. Grader report does the same and that's a Moodle core page:

image

@zishanj
Copy link
Author

zishanj commented Feb 14, 2023

@t-schroeder Grader report also have this issue and a fix is already reported. They only didn't used the responsive css class table-responsive in parent div, rest is working fine. See MDL-76827

@danmarsden
Copy link
Owner

Thanks Tim - personally I'm happy with either fix (non-transparent background) or making it restrict to the width available - although it does look visually nicer when it's restricted to the width of the parent div.

@t-schroeder
Copy link
Contributor

@zishanj When I add that CSS class I lose the sticky header.

@t-schroeder
Copy link
Contributor

I've made the table non-transparent as a quick improvement, but unfortunately I don't have the time to look into this further at the moment.

@danmarsden
Copy link
Owner

thanks @t-schroeder - I didn't expect you to have any time or need to fix this - just great to have your feedback! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants