There is a table on the site. It does not fit in the visible area of ​​the screen and falls behind it. If you open the site on the mob and then scroll the screen to the left, the table appears, and the rest of the content above and below the table goes to the left while retaining its width and a black background appears in its place. Is it possible to make the content expand? or need to somehow change the display page? screen

  • Drop the link to the code - Yernar
  • 2
    @Yernar, not a link, but put it here. Go and search - the question will be closed. Like this one, by the way. - user207618

2 answers 2

Choose:

  1. Put the table in a div and ask it overflow-x: auto to scroll the table horizontally inside it.

  2. The current behavior is much more convenient than the one you propose. If the entire page is stretched, then to read the text above, it will have to scroll. You can just change the background from black to white, which would be logical.

PS: What if the CSS class doesn't work?

    Add these styles to your table:

     overflow-x: scroll !important; width: auto !important; white-space: nowrap; 

    • Since when does overflow work with display: table ? And why width: auto , when should it be 100% ? - Qwertiy
    • @Qwertiy, I experimented on the site itself in the developers panel. Everything worked fine. With width: 100% also works - Yernar
    • This is why it works: i.stack.imgur.com/Fr3H2.png Besides, I suspect that iOS Safari doesn't work anyway. - Qwertiy
    • THANK YOU VERY MUCH!!! everything works - Kirill Donenko
    • In Safari, too, everything is OK - Cyril Donenko