Text and Image side by side

You could ensure this by putting two sub-divs inside a “mother div”, where the two sub-divs are containing the text and image respectively.
And then put a static height restraint on the sub-divs and giving them the ‘display’: ‘inline-block’ property aswell.
I.e you’ll have something like this:

html.Div(
   html.Div('here is some text', style={'display': 'inline-block', 'height': '200px'}),
   html.Div('here is an image', style={'display': 'inline-block', 'height': '200px'})
)

The produced result will then be something like:
example

1 Like