# CSS issues

**URL:** <https://forum.playcanvas.com/t/css-issues/30855>\
**Category:** Help & Support\
**Tags:** ui\
**Created:** [April 28, 2023, 2:37pm UTC](https://forum.playcanvas.com/t/css-issues/30855 "2023-04-28T14:37:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grimmy](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/grimmy/32/4776_2.png) [@Grimmy](https://forum.playcanvas.com/u/Grimmy)\
**Post date:** [April 28, 2023, 2:37pm UTC](https://forum.playcanvas.com/t/css-issues/30855/1 "2023-04-28T14:37:21Z")

</div>

Hi Im creating some of my UI in the DOM but simple things such as this css (which should just center an element horizontally) just dont work. When I run this on jsfiddle everything is fine, but as soon as I try to use it on an element in Playcanvas the element disappears. Are there some unknown parent divs in Playcanvas which are cascading their styles onto my elements or something? Cheers

```javascript
.my_ui_element{
    width:100%;
    margin:0 auto;
}

```

---

<div class="post-metadata">

**Author:** ![yaustar](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/yaustar/32/2268_2.png) [@yaustar](https://forum.playcanvas.com/u/yaustar)\
**Post date:** [April 28, 2023, 2:49pm UTC](https://forum.playcanvas.com/t/css-issues/30855/2 "2023-04-28T14:49:03Z")

</div>

Your best bet is to look at the browser inspector the DOM elements to be sure to see what is being affected
