So I am trying to do a card with a title at the top and 2 row with diffrent columns size so that rows would work separately from each other. I was doing it with custom:stack-in-card.
However don’t know why I cant set width of markdown card. I set it for 50px or less nothing works it takes much more space and push back my icon. As I see in dev tools hui-markdown-card div occupies place but I don’t know how to scale it
I dont know from where you got your card-mod-code, or you just are quite inconsistent with your “spaces” and Your “{ }”
Try to “create” your code correct ( Not that it always will “bite” you, if you don’t … it just look awfull, in my opinion
For your Markdown Width add “!important” ( width: 260px !important; )
However that’s Not the whole “deal” ( Use Inspector ) And you will find that the “hui-markdown-card” Has a " flex: 1 1 0px; " , which causes the right button-card ends up to the most right
So one way of getting it “closer” to the “text” , is adding/playing with the “flex values”
Or, set a max-width ( i.e 280px; on host )
I know that my YAML code might not look the best I was trying millions solutions to make width smaller. Yes I saw flex values but I don’t know how to change that flex 1 1 0 px on host where to apply that css. Could you tell me? Solution with negative margins works well but maybe I would try also with yours?
What you mean by IMO? I wanted air-humidifier card to be closer to the markdown. Your solution with negative margin-left is great. Thank you very much it is what I wanted. I tried so many solutions but none of them was working… I thought I will be able to style upper layer container hui-markdown-card but I couldnt. Thank you
flex: 1 will use all available space, and therefore “move” the “fixed-sized”(width) button-card to the end of row ( And yes flex is very “versatile”, and more “complex” to play with )
By using huge -margins you will move the button-card Over other “elements” Check you View in a mobile, or just reduce the size of your “view-port” on your screen ( reduce the width of your browser-window ) , the button card, will still be -180px to the left, regardless if your" Browser-Windows" is only 200px wide
PX (in a view) , is a “fixed-size” (often, depends on many other factors), however with % one can accomplice more Responsive results.
Another way, as i mention is the max-width on host
:host {
max-width: 240px !important;
}
PS: When im in doubt i always use " !important " ( To make sure best possibility it “bites” ), afterwards i go through my code, and remove “redundant” text/values, i.e 0px which doesn’t matters etc
Cleaning up codes can reduce the whole view/dasboards-size … alot in my case
However, I still dont know how to change paddings of black humidifier title I find that padding bottom is too big, but set everywhere padding: 0px and still padding is not 0. What css class should I use to style that title padding?
Ok, not to be picky, but now that you decided to use custom:button-card for the whole row(and same entity/info) You could use 3 columns
ohh, wait now you removed the first input-select, and have 2 side-by-side buttons with both i+n (but hide s+n) on the latest