I copied this code and have used it for quite a few buttons on my dashboard. Its a push on push off button that changes color and message when on and off. It looks fine when allowed to be full width on a column, but if you try to put two of them side by side, you get a scroll bar and have to scroll over to see the message. I’ve tried changing every number I can find in the code, but I can’t get it to reduce in size so that it doesn’t need the scroll bar.
[{"id":"1d6a9719.bbaee9","type":"ui_template","z":"fe166526.3bb3b8","group":"ce1619f6.d5e248","name":"Forward button","order":7,"width":"10","height":"1","format":"<!DOCTYPE html>\n\n<style>\n:focus {\noutline: 0;\n}\nmd-button45{\n display: block;\n background-color:#2e466e;\n\tmargin: 0px 0px -5px 0px; \n\twidth: 1500px; \n\t//height: 34px;\n line-height: 30px;\t\t\n border: 2px solid #666666;\n border-radius:30px;\n -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;\n border-radius: 30px;\n box-shadow: 0px 15px 0px rgba(0,0,0,0.08) inset;\n cursor:pointer;\n color:#ffffff;\n font-family:Arial;\n font-size:10px;\n text-align:center;\t\n}\nmd-button45:hover {\n\tbackground:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #415989), color-stop(1, #2e466e));\n\tbackground:-moz-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:-webkit-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:-o-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:-ms-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:linear-gradient(to bottom, #415989 5%, #2e466e 100%);\n\tfilter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#415989', endColorstr='#2e466e',GradientType=0);\n\tbackground-color:#415989;\n}\nmd-button45:active {\n\tposition:relative;\n\ttop:1px;\n}\n</style>\n\n<md-button45\n ng-style=\"{background: msg.payload=='1' ?'green':'transparrent'}\"\n ng-click=\"msg.payload = (msg.payload=='x' ? '1' : 'x'); send(msg) \"\n>\n{{msg.payload == 'x' ? 'Fwd Off' : 'Fwd On'}}\n</md-button45>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":380,"y":140,"wires":[["727d57c7.dd4d28","7703ae49.a3e6e"]],"outputLabels":["msg.payload"]},{"id":"ce1619f6.d5e248","type":"ui_group","z":"","name":"Column 2","tab":"4a3b55c0.22eccc","order":2,"disp":false,"width":"11","collapse":false},{"id":"4a3b55c0.22eccc","type":"ui_tab","z":"","name":"Robot Dashboard","icon":"dashboard"}]