Page 1 of 1

Change heights of certain blocks

Posted: Saturday 30 May 2020 9:54
by madradrakie
Hello,

I would like to change the height of a couple (or most of the blocks) but not all. I already used the following code but then all the blocks are changed in height, also the top bar and the graphs.

Code: Select all

div[class*='block_'] {
  height: 70px !important;
}
As a work around i now used the following code but then my styling css file becomes very large
:

Code: Select all

.block_76_1 {
  height: 70px !important;
}

.block_76_2 {
  height: 70px !important;
}

.block_76_5 {
  height: 70px !important;
}
is there another workaround?

Re: Change heights of certain blocks

Posted: Saturday 30 May 2020 11:40
by Lokonli
All Domoticz blocks also have the css class .mh attached to them, so I guess you can add to custom.css:

Code: Select all

.mh {
  height: 70px !important;
}
Alternatively, you could use the addClass block parameter to add a custom class to specific blocks:

Code: Select all

block[123] = {
   addClass:'height70'
}
and in custom.css:

Code: Select all

.height70 {
  height: 70px !important;
}

Re: Change heights of certain blocks

Posted: Saturday 30 May 2020 15:05
by madradrakie
super! the addclass function works perfectly! :D