for example, I have a dash app with a function to generate html element dynamically:
def generateEmptyProjectOverview():
return [
html.Table(
children=
[html.Colgroup([
html.Col(), html.Col(id="specCol1"), html.Col(), html.Col(id="specCol2")]
)] +
#
[ html.Tr([
html.Td(html.Img(src="/static/images/car_s.png")), html.Td( html.H5("vehicle number")),
html.Td(html.Img(src="/static/images/calibration_s.png")), html.Td( html.H5("calibration dataset number")) ])] +
#
[ html.Tr([
html.Td(html.Img(src="/static/images/distance_s.png")), html.Td( html.H5("total distance")),
html.Td(html.Img(src="/static/images/warning_s.png")), html.Td( html.H5("warning labels")) ]) ],
className = "tb_projectoverview",
)
]
.tb_projectoverview {
margin: auto;
}
.tb_projectoverview td {
width: 100px;
height: 120px;
text-align: left;
border: 0;
color: #595959;
}
#specCol1, #specCol2{
width: 350px;
}
but these style will not be applyed to the html elements.