Change heights of certain blocks Topic is solved

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
madradrakie
Posts: 64
Joined: Wednesday 11 September 2019 21:24
Target OS: -
Domoticz version:
Contact:

Change heights of certain blocks

Post 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?
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Change heights of certain blocks

Post 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;
}
madradrakie
Posts: 64
Joined: Wednesday 11 September 2019 21:24
Target OS: -
Domoticz version:
Contact:

Re: Change heights of certain blocks

Post by madradrakie »

super! the addclass function works perfectly! :D
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest