text in block center

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
coene369
Posts: 5
Joined: Wednesday 20 December 2017 9:10
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: geleen
Contact:

text in block center

Post by coene369 »

hi,

how can I center the text in the blocks.

This my config.js

blocks = {}

//schakelaars

blocks[18] = { //soldeerbout
width: 12,
hide_data: true,
icon: 'fas fa-fire'
}

blocks[19] = { //oplader accu
width: 12,
hide_data: true,
icon: 'fas fa-battery-half'
}

blocks[20] = { //lijmpistool
width: 12,
hide_data: true,
icon: 'fas fa-tint'
}

blocks[12] = { //licht werkbank
width: 12,
hide_data: true
}

//columns
columns = {}

columns[1] = {
blocks : [18, 19],
width: 6
}
columns[2] = {
blocks : [20, 12],
width: 6
}

//Definition of screens
screens = {}
screens[1] = {
columns: [1, 2]
}

Thank you
Attachments
2019-10-17.png
2019-10-17.png (399.88 KiB) Viewed 674 times
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: text in block center

Post by HansieNL »

You can add this code to your custom.css file:

Code: Select all

.block_18,
.block_19,
.block_20,
.block_12 {
    text-align: center;
}
Blah blah blah
User avatar
madpatrick
Posts: 667
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: text in block center

Post by madpatrick »

Hi,

I'm trying center the 2 block on my standby screen.
Somehow it is a lttle bit out-centered. Probably due the icon, but i'm not sure
The icon i've disabled.

Image

config.js

Code: Select all

blocks['regen'] 		= {idx: 444, width: 6, title: 'Buienradar', switch: true, icon: ''}
custom.css

Code: Select all

/* STANDBY SCREEN */
.standby .clock				{text-align: center !important;font-size:80px !important;padding-top:150px;}
.standby .weekday			{text-align: center !important;font-size:50px !important;color:grey !important;}
.standby .date				{text-align: center !important;font-size:30px !important;color:grey !important;}
.standby .row 				{opacity:0.8 !important;} 
/* BUIENRADAR TEKST */
.block_regen 				{width: 100% !important;text-align: center !important;}
.block_regen .title 			{font-size: 30px !important;color:grey !important;}
.block_regen .value 			{font-size: 20px !important;color:grey !important;}
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2025.1 -=- Dashticz v3.14b on Tab8" =-
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest