# How to style UI template elements (buttons, text inputs)

**URL:** <https://discourse.nodered.org/t/how-to-style-ui-template-elements-buttons-text-inputs/22261>\
**Category:** Dashboard\
**Created:** [25 February 2020 23:06 UTC](https://discourse.nodered.org/t/how-to-style-ui-template-elements-buttons-text-inputs/22261 "2020-02-25T23:06:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Digital-Thor](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@Digital-Thor](https://discourse.nodered.org/u/Digital-Thor)\
**Post date:** [15 March 2020 21:58 UTC](https://discourse.nodered.org/t/how-to-style-ui-template-elements-buttons-text-inputs/22261/2 "2020-03-15T21:58:36Z")

</div>

Hi @hazymat, Here's an example ui-template that I figured out to fix the button issue. As an example I'm using a button to start fullscreen on the browser.

```auto
<style>
    #go-fullscreen-btn {
        height: 100%;
        border-style: unset;
    }
    .btn-parent {
        padding: 0 !important;
    }
</style>
<md-button id="go-fullscreen-btn" ng-click="send({payload:action('go fullscreen')})" type="button">Go Fullscreen
</md-button>
<script>
    fsElem = document.documentElement;
    theParentElem = document.getElementById("go-fullscreen-btn").parentNode
    theParentElem.classList.add('btn-parent')
    
    this.scope.action = function(params) {
    console.log("params received is: ",params)
    if (fsElem.requestFullscreen) {
        fsElem.requestFullscreen();
        } else if (elem.mozRequestFullScreen) { /* Firefox */
        fsElem.mozRequestFullScreen();
        } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */
        fsElem.webkitRequestFullscreen();
        } else if (elem.msRequestFullscreen) { /* IE/Edge */
        fsElem.msRequestFullscreen();
        }
    // In fullscreen. Now hide the button.
    document.getElementById("go-fullscreen-btn").classList.add('ng-hide');
    return {payload:"Fullscreen is active."}
    }
</script>

```

---

_[View the full topic](https://discourse.nodered.org/t/how-to-style-ui-template-elements-buttons-text-inputs/22261)._
