#Scrollable window card?

1 messages · Page 1 of 1 (latest)

lilac trout
#

I was looking around and tried serveral cards including markdown and custom cards basically i have a table information which i want to be able to scroll if the list is getting to long instead of having a massive list of items. So example if its over 400px it will scroll inside the window. Which custom card would i need. It could be a html scroll or something similar.

i can grabbing data from sensors and putting them in a list.

humble belfry
#

Markdown will scroll in a sections view if you set the rows in grid_options

lilac trout
#

will try that

#

I feel like i am doing something wrong in the markdown itself it always puts out one massive block of text is there any examples with rows and scrolling

humble belfry
#

screenshot?

#

try adding extra line breaks maybe

lilac trout
#

i'll send the code and the screen

humble belfry
#

Are you using a sections view or masonry?

pure hearth
#

Confirmed the code shown in the screenshot (regular text is preferred, btw) does scroll in Section view. It does not scroll in Masonry view. Adding some card_mod seems to do the trick. ```yaml
type: markdown
grid_options:
rows: 4
content: |

Scroll Test

<div style="max-height: 200px; overflow-y: auto;">
Line 1<br>
Line 2<br>
Line 3<br>
Line 4<br>
Line 5<br>
Line 6<br>
Line 7<br>
Line 8<br>
Line 9<br>
Line 10<br>
</div>
card_mod:
style: |
ha-card {
height: 150px !important;
}````<div></div>` is all that is really needed; the div style is not.

#

(Note: The grid_options is extraneous in this example when used in Masonry view. Using the card_mod in a Section view configuration will probably lead to an undesired result as the Section will still take up space.)

lilac trout
#

I am using Sections? should i use masonry?
Card_mod still didn't do anything maybe its just my install 😄
I tried the markdown you supplied in both sections and masonry view and its still the same..
how bizarre

#

just stays all the lines

pure hearth
#

Sections vs Masonry is going to be personal preference and whatever works best with your dashboard design. Sections is pretty easy to work with a get a good-looking layout. Masonry is easier to work with but lacks some layout capability. Plus, masonry kinda does whatever it wants to do sometimes. I tend to do everything manually with layout-cards, but I also run them in YAML-mode.
The screenshots from above are from a Storage-mode dashboard (more than likely what you're running) in Firefox on PC. I considered perhaps it is a browser issue. It works in Chrome and Edge on PC. Dug out MacBook and the code works in Firefox and Safari. (Interestingly, it could not handle loading the masonry view on my test dashboard but in its defense, there's a lot going on with all the random crap I've messed with.) Maybe try a different browser and/or device and see what happens. Maybe there's a caching issue. (See the pinned thread.) Maybe there's a browser setting or extension messing with something. DarkReader perhaps?
Maybe you need to update? Maybe this is something that works on a newer Markdown card? I'm sure karwosts will come in here and say that that has been a feature for the past four years or something. He gets me all the time with that when I find a "new" feature.
card_mod would need to be installed if you don't already have it. Card-mod can be finicking sometimes but usually still does as it is told.
Not sure where to go next. 🤷‍♂️