@@ -53,6 +53,7 @@ class PredbatTableCard extends HTMLElement {
5353 const dataArray = this . getArrayDataFromHTML ( rawHTML , hass . themes . darkMode ) ;
5454 let theTable = document . createElement ( 'table' ) ;
5555 theTable . setAttribute ( 'id' , 'predbat-table' ) ;
56+ theTable . setAttribute ( 'cellpadding' , '0px' ) ;
5657
5758 //set out the table header row
5859
@@ -204,6 +205,7 @@ class PredbatTableCard extends HTMLElement {
204205 newCell . style . border = "1px solid white" ;
205206 newCell . style . backgroundColor = "#FFFFFF" ;
206207 newCell . style . color = "#000000" ;
208+ newCell . style . height = "22px" ;
207209
208210 if ( theItem . value === "Both" && column === "state-column" ) {
209211
@@ -763,9 +765,6 @@ class PredbatTableCard extends HTMLElement {
763765 let tableHeaderColumnsBackgroundColour ;
764766 let boldTextDisplay ;
765767
766- if ( this . config . old_skool === true )
767- maxHeight = "22px" ;
768-
769768 if ( isDarkMode ) {
770769 oddColour = "#181f2a" ;
771770 evenColour = "#2a3240" ;
@@ -813,7 +812,10 @@ class PredbatTableCard extends HTMLElement {
813812 if ( this . config . stack_pills === true || this . config . stack_pills === undefined )
814813 maxHeight = "54px" ;
815814 }
816-
815+
816+ if ( this . config . old_skool === true )
817+ maxHeight = "22px" ;
818+
817819 return `
818820 .card-content table {
819821 /* Your styles for the table inside .card-content */
@@ -858,6 +860,7 @@ class PredbatTableCard extends HTMLElement {
858860 .card-content table tbody tr td {
859861
860862 height: ${ maxHeight } ;
863+ vertical-align: middle;
861864 align-items: center;
862865 -- width: 60px;
863866 border: 0;
0 commit comments