Hey @philo ,
I really do not know why is this behaivour but I’m wraped all components in an html.Div and then it works, I added borders to see each component limits, for some reason I also don’t know the dcc.Dropdown is not aligned, you can manage it using margin top.
Here is the code:
import dash
import dash_table
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash(__name__)
app.layout=html.Div([
html.Div([
html.H4('Customer Name',style={'display':'inline-block','margin-right':20, 'border': '1px solid black'}),
dcc.Input(id='customer-name',type='text',placeholder='',style={'display':'inline-block', 'border': '1px solid black'}),
], style={'display':'inline-block', 'border': '1px solid black'}),
html.Div([
html.H4('Site Name',{'display':'inline-block', 'border': '1px solid black'}),
], style={'display':'inline-block', 'margin-right':20, 'margin-left':20, 'border': '1px solid black'}),
html.Div([
dcc.Input(id='site-name',type='text',placeholder='',style={'display':'inline-block', 'border': '1px solid black'}),
], style={'display':'inline-block', 'border': '1px solid black'}),
html.Div([
html.H4('Facility type',style={'display':'inline-block','margin-right':20, 'border': '1px solid black'}),
], style={'display':'inline-block', 'margin-right':20, 'margin-left':20, 'border': '1px solid black'}),
html.Div([
dcc.Dropdown(id='facility',
options=[{'label':'Unknown','value':''},
{'label':'Cold Storage','value':'cs'},
{'label':'Commercial Office Space','value':'cos'},
{'label':'School','value':'sch'},
{'label':'Grocery Store','value':'gro'},
{'label':'Community Centre','value':'cc'}],
value='',
style={'width':'500px',
'height': '50px',
'lineHeight': '60px',
'border': '1px solid black',
})
], style={'display':'inline-block', 'border': '1px solid black'}),
])
if __name__ == "__main__":
app.run_server(debug=True)
here is the result: