Yes. Then it is applied to the mod-card. You can double-check in dev-tools of your browser. If it now does, what you want has to be evaluated by you and the css perhaps be adjusted to your needs.
As long as it is not clear what you want to have, it is hard to help. The code above is doing what it is for. Try yourself with adjusting the 0px to eg. 50px.
I want my 2 buttons at the bottom of my screen, centered. As a menu, but at the bottom. So I have a menu, on every page on the same spot (centered and at the bottom)
Then I donāt know for what you are ingesting all the CSS above? Iām not an expert of positioning CSS, but something like this should be more in the right direction.
So I did some experimenting to try to understand why my original post did not help you. Hereās what Iāve gathered so far based on what youāve already tried.
The card_mod does not need to be put in a card_mod card. I didnāt even know that was a thing until I saw it in your code. In fact, the developer even says not to use it any more.
Layout cards do not seem to be affected by the positioning. Iāve tried horizontal-stack, vertical-stack, grid, and custom:layout-card. That would have made things so much easier if it did.
Because the layout cards couldnāt be positioned, putting the card_mod under each card allowed me to position them using bottom and left parameters changing the left value appropriately. I would also suggest defining the unit as px or % instead of leaving it off; things got weird with some cards.
The code that @arganto and I provided does not seem to work with the custom:button-card (which I use on about 80% of my dashboards). I was, however, able to make several of the HAās included cards to be positionable: markdown, light, entity, and button all worked during testing. Interestingly, the Mushroom Light Card also worked (so it might be fair to assume the rest of the Mushroom cards will work too). Look into the Mushroom Chip cards as I think that might be an alternative instead of the custom:button-card.
Be careful with the positioning so you donāt overlap something important such as the Edit or Done buttons. With the z-index set to display on top of everything, you canāt click those buttons if you place another one on top of it. (I had to go into the Raw Editor in order to move some stuff around.)
Hereās my final code after experimenting. (I only posted two buttons in the code, but, as seen in the screenshot, I also used an entity, button, and Mushroom Light Card.)
ad 1. You should not use it always or donāt use it, if there is a ha-card element, because you donāt need it then. This is, what the developer says. Not more
ad 2. layout-card donāt have a ha-card-element, so you have to use it. This is exactly for what it is for. So the approach above was right (and is working) and with this you can position it.
ad 3. And because of ad2 and ad3 the above mod with mod-card and my css is working. Just try it.
@arganto Learning something new every day. With all the card_mod that Iāve used, I didnāt know what the card_mod card can be useful for. So with that in mind, you took your thoughts and combined them with what @Faecon is trying to accomplish. (Donāt mind my placement values; theyāre for experimenting.)
EDIT: Using the card-mod card seems to have broken my earlier example (placing the individual cards). But, now the chips cards can, potentially, be individually positionedā¦ Weird stuff.
Could someone āspell-this-outā for me, using Home Assistant OS (2023.6.1)?
I just canāt create the example(s) described. Iām hoping itās because things have changed, but itās probably because Iām missing something really obvious.
You should start posting, what you are really using. The code above is wrong and so most probably not even in use or creating the screenshot. type is not indent correctly.
Secondly why the - type? Is is within another card or are you in yaml-mode (why?) and this is from the whole screen?
Thirdly. Start 1:1 (!) with the working and given examples and iterate from there. Then you will see, that my code is working and the problem is your change from 0 to 45. If you want to have more space, put some padding or use px.
It is only the first line that was not ok. I copied it and it changedā¦
I thought i could change the height with changing the bottom, it wat clearly with padding. I didnt know that
There was asked to show full setup and what i wantedā¦ From the first post I made, i said that i wanted two buttons centered and on a distance of the bottom.
Thanks for helping me and I dont want to offend you but I really dont see what i did wrong in this conversation. I am just a beginner who wants help and indont know all the possibilities to make things right
Perhaps Iām most of the time too picky, if someone is not trying out the given examples and that from there and instead of this using directly changed iterations and say: the example is not working.