# Can I style DCC components directly in the app without Div?

**URL:** <https://community.plotly.com/t/can-i-style-dcc-components-directly-in-the-app-without-div/44120>\
**Category:** Dash Python\
**Created:** [August 24, 2020, 7:13am UTC](https://community.plotly.com/t/can-i-style-dcc-components-directly-in-the-app-without-div/44120 "2020-08-24T07:13:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruslaniv](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@ruslaniv](https://community.plotly.com/u/ruslaniv)\
**Post date:** [August 24, 2020, 7:13am UTC](https://community.plotly.com/t/can-i-style-dcc-components-directly-in-the-app-without-div/44120/1 "2020-08-24T07:13:01Z")

</div>

How can I style DCC components directly in the app without using a Div?  
Is it possible to style it directly, something like this?

```auto
dcc.Slider(id='slider', min=0, max=50, step=2, value=10, style=dict(width='50%'))

```

I did try it and got:

```auto
TypeError: The `dash_core_components.Slider` component (version 1.10.2) with the ID "slider" received an unexpected keyword argument: `style`

```

It seems to me that the only way to style it directly is to wrap it in a div.  
Is there a way to avoid this extra code?
