Page 1 of 1

text in block center

Posted: Thursday 17 October 2019 13:13
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

Re: text in block center

Posted: Thursday 17 October 2019 13:38
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;
}

Re: text in block center

Posted: Monday 19 October 2020 17:46
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;}