Mjd Altayeb
Mjd Altayeb

Reputation: 23

Scroll only showing part of the element

so am trying to make a table have a fixed size and horizontally scrollable, and I added overflow-x: auto;, but for some reason it only scrolling part of the table while the start of the table is outside of the screen, I am unable to show the code so here is a sample to make it clearerenter image description here

the green part can be scrolled normally but the scrollbar end it the red part, when I zoom out or add margin it appears, but that is not really a solution. The table is inside a flex container if that matters, but does not have anything applied on it.
thanks

Upvotes: 0

Views: 550

Answers (3)

Alii Isk
Alii Isk

Reputation: 80

  • remove justify-content: center on your div if you have one. i was having the same problem ,then i found out that having justify-content: center on the div was the one causing the issue.

Upvotes: 0

fdsafas
fdsafas

Reputation: 328

try overflow-x: scroll; instead of overflow-x: auto;

Upvotes: 1

Muhammad-Emara
Muhammad-Emara

Reputation: 9

So, I will try to guess your code as you could not share with some assumption and provides some steps may help:

  • try to get your table outside and test if the issue still there!! if yes your issue is mainly with your table style
  • if no, try to change the flow of FLEX container to be column and check if fixed.
  • if still try to add min to div containing your table inside the flex container

otherwise, you should provide a small sample of your code to sort out the issue more clearly.

Upvotes: 0

Related Questions