# Images included in dcc.RadioItems are not lining up

**URL:** <https://community.plotly.com/t/images-included-in-dcc-radioitems-are-not-lining-up/73184>\
**Category:** Dash Python\
**Created:** [March 2, 2023, 12:32am UTC](https://community.plotly.com/t/images-included-in-dcc-radioitems-are-not-lining-up/73184 "2023-03-02T00:32:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjago](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mjago](https://community.plotly.com/u/mjago)\
**Post date:** [March 2, 2023, 12:32am UTC](https://community.plotly.com/t/images-included-in-dcc-radioitems-are-not-lining-up/73184/1 "2023-03-02T00:32:20Z")

</div>

Hello,

I’m using images in the dcc.RadioItems component, however, the images are not coming out aligned with the component on the same line. I don’t know what’s going on, I think it could be something simple, but I can’t see it, can someone help me?

![graphs](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/2/0/20a5cb90a974cc462f7b70fc532d545555f3c131.png)

```auto
app.layout = dcc.RadioItems(
                [                
                    {
                        "label": html.Div(
                            [
                                html.Img(src="/assets/images/barras.png", height=35),
                                html.Div("Bar", style={'font-size': 15,'padding-left': 10}),
                            ], style={'display': 'flex', 'flex-direction': 'row', 'align-items': 'center', 'justify-content': 'left'}
                        ),
                        "value": "Bar",
                    },
                    {
                        "label": html.Div(
                            [
                                html.Img(src="/assets/images/bar_group.png", height=35),
                                html.Div("Group Bar", style={'font-size': 15, 'padding-left': 10}),
                            ], style={'display': 'flex', 'flex-direction': 'row', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
                        ),
                        "value": "Group Bar",
                    },
                    {
                        "label": html.Div(
                            [
                                html.Img(src="/assets/images/linhas.png", height=35),
                                html.Div("Line", style={'font-size': 15, 'padding-left': 10}),
                            ], style={'display': 'flex', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
                        ),
                        "value": "Line",
                    },
                    {
                        "label": html.Div(
                            [
                                html.Img(src="/assets/images/pizza_2.png", height=35),
                                html.Div("Pie", style={'font-size': 15, 'padding-left': 10}),
                            ], style={'display': 'flex', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
                        ),
                        "value": "Pizza",
                    },
                    {
                        "label": html.Div(
                            [
                                html.Img(src="/assets/images/rosca_2.png", height=35),
                                html.Div("Pie 2", style={'font-size': 15, 'padding-left': 10}),
                            ], style={'display': 'flex', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
                        ),
                        "value": "Pie",
                    },
                ]
    )

```

---

<div class="post-metadata">

**Author:** ![hoatran](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/hoatran/32/21447_2.png) [@hoatran](https://community.plotly.com/u/hoatran)\
**Post date:** [March 2, 2023, 3:10am UTC](https://community.plotly.com/t/images-included-in-dcc-radioitems-are-not-lining-up/73184/2 "2023-03-02T03:10:59Z")

</div>

Hm I tried to change from `'display':'flex'` to `'display':'inline'` and I think it worked. I did something as below:

```auto
from dash import dcc, html
import dash

app = dash.Dash( __name__ )
app.layout = dcc.RadioItems(
                [                
                    {
                        "label": html.Div(
                            [
                                html.Img(src="/assets/bars-chart.png", height=35),
                                html.Div("Bar", style={'font-size': 15,'padding-left': 10, 'display': 'inline'}),
                            ], style={'display': 'inline', 'flex-direction': 'row', 'align-items': 'center', 'justify-content': 'left'}
                        ),
                        "value": "Bar",
                    },
                    {
                        "label": html.Div(
                            [
                                html.Img(src="/assets/bars-chart.png", height=35),
                                html.Div("Group Bar", style={'font-size': 15, 'padding-left': 10, 'display': 'inline'}),
                            ], style={'display': 'inline', 'flex-direction': 'row', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
                        ),
                        "value": "Group Bar",
                    },
                    {
                        "label": html.Div(
                            [
                                html.Img(src="/assets/bars-chart.png", height=35),
                                html.Div("Line", style={'font-size': 15, 'padding-left': 10, 'display': 'inline'}),
                            ], style={'display': 'inline', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
                        ),
                        "value": "Line",
                    },
                    {
                        "label": html.Div(
                            [
                                html.Img(src="/assets/bars-chart.png", height=35),
                                html.Div("Pie", style={'font-size': 15, 'padding-left': 10, 'display': 'inline'}),
                            ], style={'display': 'inline', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
                        ),
                        "value": "Pizza",
                    },
                    {
                        "label": html.Div(
                            [
                                html.Img(src="/assets/bars-chart.png", height=35),
                                html.Div("Pie 2", style={'font-size': 15, 'padding-left': 10, 'display': 'inline'}),
                            ], style={'display': 'inline', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
                        ),
                        "value": "Pie",
                    },
                ], inline=True
    )

if __name__ == ' __main__':
    app.run_server(debug=False, port = 8052)

```

 ![Screenshot 2023-03-02 101030](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/8/8/88764e75323d0b5fee6fa076bb573ccae439400a.png)

---

<div class="post-metadata">

**Author:** ![mjago](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mjago](https://community.plotly.com/u/mjago)\
**Post date:** [March 2, 2023, 11:11am UTC](https://community.plotly.com/t/images-included-in-dcc-radioitems-are-not-lining-up/73184/3 "2023-03-02T11:11:33Z")

</div>

@ [hoatran](https://community.plotly.com/u/hoatran),

That’s right, thank you very much, just changing the style to solve, the question was me to know where. Thanks again.
