I am trying to use CSS to center the text and label in a ui-text-input. Not having any luck and have found several suggestions, but none work.
I could get the label aligned, but not the input field
[{"id":"a2cce70de800fc2a","type":"ui_text_input","z":"8aeac5104f2cecfe","name":"","label":"Centered","tooltip":"","group":"ff9fdb9a.7da098","order":2,"width":"12","height":"1","passthru":true,"mode":"text","delay":300,"topic":"topic","sendOnBlur":true,"className":"center-text","topicType":"msg","x":585,"y":3350,"wires":[["0b9192d9052258fe"]]},{"id":"7c30d14367c2f3ed","type":"inject","z":"8aeac5104f2cecfe","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Input Here","payloadType":"str","x":310,"y":3350,"wires":[["a2cce70de800fc2a","726dd061d3151051","c997e79c4d8ff429"]]},{"id":"86a4b0e6bf845c26","type":"ui_template","z":"8aeac5104f2cecfe","group":"ff9fdb9a.7da098","name":"","order":12,"width":0,"height":0,"format":"<style>\n\n.center-text {\nfont-size:0.9em;\nbackground:red;\ncolor: white;\nfont-family: \"Trebuchet MS\";\ntext-align: center;}\n\n.right-text {\nfont-size:0.9em;\nbackground:blue;\ncolor: white;\nfont-family: \"Trebuchet MS\";\ntext-align: right;}\n\n.left-text {\nfont-size:0.9em;\nbackground:green;\ncolor: white;\nfont-family: \"Trebuchet MS\";\ntext-align: left;}\n\n </style>\n\n ","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":585,"y":3300,"wires":[[]]},{"id":"726dd061d3151051","type":"ui_text_input","z":"8aeac5104f2cecfe","name":"","label":"Left Aligned","tooltip":"","group":"ff9fdb9a.7da098","order":2,"width":"12","height":"1","passthru":true,"mode":"text","delay":300,"topic":"topic","sendOnBlur":true,"className":"left-text","topicType":"msg","x":595,"y":3400,"wires":[["0b9192d9052258fe"]]},{"id":"c997e79c4d8ff429","type":"ui_text_input","z":"8aeac5104f2cecfe","name":"","label":"Right Aligned","tooltip":"","group":"ff9fdb9a.7da098","order":2,"width":"12","height":"1","passthru":true,"mode":"text","delay":300,"topic":"topic","sendOnBlur":true,"className":"right-text","topicType":"msg","x":595,"y":3450,"wires":[["0b9192d9052258fe"]]},{"id":"ff9fdb9a.7da098","type":"ui_group","name":"TEST","tab":"67adc3454d3fcffe","order":1,"disp":false,"width":"12","collapse":false,"className":""},{"id":"67adc3454d3fcffe","type":"ui_tab","name":"MOBILE","icon":"dashboard","order":4,"disabled":false,"hidden":false}]
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.