I’m using bootstrap CSS to create my layout. I imagine my approach is wrong as it takes lots of code to create nested div classes. Please let me know if their is a more appropriate way to build my layout. The code is below:
html.Div(
[
html.Div(
[
html.H3(children='Facebook Overview'),
html.P(children='Spend (Last 30 Days): $%.2f' % fb_total_spend),
html.P(children='Spend (Yesterday): $%.2f' % fb_yesterday_spend),
],
className="col-sm"
),
html.Div(
[
html.H3(children='Adwords Overview'),
html.P(children='Spend (Last 30 Days): $%.2f' % google_total_spend),
html.P(children='Spend (Yesterday): $%.2f' % google_yesterday_spend),
],
className="col-sm"
),
html.Div(
[
html.H3(children='All Accounts Overview'),
html.P(children='Spend (Last 30 Days): $%.2f' % total_30day_spend),
html.P(children='Spend (Yesterday): $%.2f' % total_yesterday_spend),
],
className="col-sm"
),
],
className="row"
),
This example isn’t too bad, but it will quickly become a lot if I want to add more more bootstrap features to each column (such as cards or a jumbotron).