max_width is ignored
See original GitHub issueAfter trying for so long I give up and ask for help.
Somehow, I can’t get max-width working in my config: I get columns with the same width. I’ve copied someone’s config that’s been know to be working (I saw his screens), it is the following:
id: roomsalt
panel: true
path: roomsalt
title: Rooms alt
cards:
- type: custom:layout-card
layout: vertical
column_num: 2
max_width: [40%, 60%]
cards:
- type: entity-button # Header Card - 40% column
entity: light.hg_bed
name: test-label-1
show_icon: false
show_label: false
show_name: true
- type: horizontal-stack
cards:
- type: custom:button-card
template: header
label: test-label-1
entity: light.hg_bed
- type: custom:button-card
template: header
label: test-label-1
entity: light.hg_bed
- break
- type: entity-button # Header Card - 60% column
entity: light.hg_bed
name: test-label-2
show_icon: false
show_label: false
show_name: true
- type: horizontal-stack
cards:
- type: custom:button-card
template: header
label: test-label-2
entity: light.hg_bed
- type: custom:button-card
template: header
label: test-label-2
entity: light.hg_bed
- type: custom:button-card
template: header
entity: light.hg_bed
And somehow, I get 33% for every column width …
I’m running home assistant 0.94.3, I tried getting back to 0.93 but the issue remains.
-> Would anyone have a clue about how to fix this ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Chrome, Safari ignoring max-width in table - Stack Overflow
The problem is that Chrome and Safari are ignoring "max-width:1000px" My friend has found that we can prevent it by adding "display:block" for...
Read more >max-width - CSS: Cascading Style Sheets - MDN Web Docs
The max-width CSS property sets the maximum width of an element. It prevents the used value of the width property from becoming larger...
Read more >maxWidth / minWidth being ignored on animation - GSAP
Hi there - I have set a min and max width on a div, however the code below constantly adds 100px to the...
Read more >HTML : Table colgroup min-max-width ignored - YouTube
HTML : Table colgroup min- max-width ignored [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] HTML : Table colgroup ...
Read more >Grid Column MaxWidth ignored when ColumnSpan is used?
Yes, if you use the "Grid.ColumnSpan="2"", the Grid will ignore the single column width and MaxWidth when execute the Arrange() and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Gandohr Thank you for showing me that my config was correct. I was able to get it to work by enabling panel mode. From the instructions, it only hints that with panel mode it works better, not that it is mandatory for it to work! I wanted for the columns to be centered and not to fill the whole screen but using this custom card is still much better than trying to guess where lovelace will put the cards!
Should be fixed in latest version. The entire configuration is a bit changed, so using max_width shouldn’t even be necessary.