HTML horizontal overflow display, vertical overflow scroll

I need to have a scroll bar for vertical content that overflows from the contents of the div, but I need the overflow content from X to remain visible. Is it possible? Sorry for the lack of details.

My current code is:

overflow-y: scroll

overflow-x: visible;

This code does what it should for the Y axis, but it creates a scroll bar for the X axis as well. I need this to show this content, not the clip.

Thanks for the help, I'm sure the answer will make me sound like a complete coding dummy. I searched for this for about 5 hours, and now - 4:30. I need this project as soon as possible. Thanks again!

+4
source share
2 answers

Not sure what you meant, but you can set it to scroll only in overflow, like this:

#something { overflow-x:scroll; } 

But you can try to try like this:

 #something { overflow-x:auto; } 

This will only create scrollbars where you need them.

Of course, you should probably try just removing everything about the overflow-x property, which may also work.

0
source

So sorry guys, I fixed it. Maybe someone else can learn from this, so I'm going to post what I did. I just created another DIV, set it to the size of the image and set the vertex to the position of the text I need. Then I created another DIV for the rest of the content and moved it. Now there is a main scrollable div with 2 divs inside. Each of them contains content.

0
source

Source: https://habr.com/ru/post/1400719/


All Articles