Hi guys, I have a row inside a div, and this row is horizontal and inside it has several containers. I wanted one of these containers to be frozen when I scroll horizontally. I tried using sticky, but it’s not the parent element that has the overflow scroll, it’s an element higher up. Does anyone have a solution?
In this image, I wanted to freeze the container under “unidade”, and as you can see, the scroll is not on the line, it is outside, which prevents the sticky
In this image, the “placeholder” container has a width of 100% and an overflow scroll and the “flexbox” has a width of 175% which makes it go beyond the screen to drag horizontally. and as you can see, the element that is selected is the element that I wanted to be frozen
I don’t know if there is a correct way to share the editor’s link, I just copied mine’s link hahaha, if there is, let me know and I’ll do whatever is necessary
Maybe it’s a bit late, but came up with a solution to freeze any column to the left, inside the Table component.
I think adding position: sticky and left:0 would have done the trick, but with the auto-generated wrappers, it’s not working. Fortunately, we can still add some custom styling. This worked for me (add the style to an HTML embed to preview it in the editor) :
You can modify the number in nth-child(1) to modify which column you want to freeze.
Don’t forget to add a background-color to the corresponding cells to hide the overlapped elements.
for the headers, which have a div and inside the columns that contain the cells, it worked
but for the collection structure, which is a div, inside a column, which inside contains a column (contains the cells) and another div, it didn’t work
I created this structure in the collection because I have a function that expands the row and this container that is together with the columns appears
@jptrinh i’ve seen you managed to solve the issue in this topic, but if i follow your solution i’m not able to do this.
I’ll share with you my situation hoping you could help.
In the image i show my situation of nested div if can help here’s my div ‘identifier’ “data-v-2026b9e8”.
And this below is the code inside my HTML block.
Make sure you are targetting the correct elemnents, you can double check by inspecting the elements that are supposed to have the properties applied. And you should see something like this:
I’ve tried to implement the thing as you suggested, but is not working. When i inspect the html i see the ‘html’ element added to have the style as specified but is not giving the style to the interested column.
Moreover i’ve tried to hardcode the same style directly in the css and then in the html inspector and still the column doesn’t have the expected behaviour.
I’m not sure on how to make this thing happen, could you send a loom in which you try to explain in details the solution?
Anyway thank you so much for your time!