Blocks - increase width for icon

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
DeVille70
Posts: 32
Joined: Friday 04 December 2015 21:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sandnes, Norway
Contact:

Blocks - increase width for icon

Post by DeVille70 »

In blocks, is there any way i can increase the width set aside for the icon? In understand that I can change the size of the icons as well as font size, but with the sizes I would like to use, the icon and texts of title and data comes on top of each other. Any way I can fix that, please?
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blocks - increase width for icon

Post by Lokonli »

It depends on the block type. For Domoticz devices you can do it as follows:

1)
Add a custom class to the block, like:

Code: Select all

blocks[123] = {
  addClass: 'bigicon',
  ...
}
2) Define the css settings in custom.css:

Code: Select all

.mh.bigicon {
  height: 140px !important
}

.mh.bigicon .col-icon {
  width: 100px !important;
}

.mh.bigicon .col-icon .icon{
  font-size: 80px !important;
}

.mh.bigicon .col-data {
  width: calc(100% - 100px) !important;
}

.mh.bigicon img.icon{
  width: 80px !important;
  max-width: 80px !important;
}
This will work for font-awesome icons as well as images as icon.
DeVille70
Posts: 32
Joined: Friday 04 December 2015 21:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sandnes, Norway
Contact:

Re: Blocks - increase width for icon

Post by DeVille70 »

That gave me a few options to play around with. Thank you very much.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest