Text align

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
edwin1234
Posts: 287
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Text align

Post by edwin1234 »

How to align a blocktitle to the middle ?

Now my blocktitles are align to the left and i cant find out hiw to change it.

Noob here , be gentle ;)
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Text align

Post by Lokonli »

Assume you have defined a block in CONFIG.js with:

blocks['customblock'] = ...

add the following to custom.css:

Code: Select all

  .block_customblock .title {
      text-align:center;
      width: 100%;
      display: inline-block
  }
or, by using the addClass parameter, define a block as follows:

Code: Select all

blocks['anyname'] = {
   addClass: 'centeredtitle',
  ...
}
and add to custom.css:

Code: Select all

  .centeredtitle .title {
      text-align:center;
      width: 100%;
      display: inline-block
  }
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: Text align

Post by Doudy »

👍
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
edwin1234
Posts: 287
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Re: Text align

Post by edwin1234 »

Thank u very much for your help.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest