hi @Bambos ,
Welcome to the community and than you for your question.
Iām not 100% clear on how you want to align things in the dataTable. Can you share a final image or drawing of how you would like the layout to look like?
Hello @adamschroeder , yes and no, doing manipulation with margins it might work on a certain browser size, but not working ok when resizing the browser window.
my target is to have tables as āinline blockā , with some space between them (margin) and all the row to be centered. like this :
Also i have similar issue with html.H4 in html.Div.
Target is to have in the same line 2X html.H4 objects, aligned left with some margin and align right with some margin, letting the space be in the middle.
I thought using a main Div, with the objects in a separate Div would give more flexibility (because of different style dictionary to each object) but seems again something is wrong.
@adamschroeder itās been very nice week getting familiar with bootstrap component. Thank you.
it feels more controllable layout in comparison to the plain html.Div container.
do you have a suggestion on how to make smaller text in a dbc.input text box ? i check all documentation, i couldnāt find any of this kind of property.
Iām trying to fit an IP address inside a column (this block is on a parent column)
hi @Bambos
Thatās a good question. Iām not sure but if you share a minimum working example (code), I can try playing around with it and see if I can find a way.
This is the absolute smaller amount of code i could do, as the example layout is 3 parent columns with row and 4 subcolumns in each parent column. Objective is to fit a normal IP address with 3 digits address in the input text box. I saw the property size=āsmallā without any impact. thank you for your effort.
Note first of all that size="small" has no effect, it should be size="sm", however in this case the size of the input box itself is decreased which is i think not what you want.
You can set the font size using the style argument, but note that the font size also influences the height of the input box, so you must also set the line height to compensate. By default the font size is 1rem and the line height is 1. If you multiply the font size by x, you must multiply the line height by 1 / x to compensate. E.g. if you halve the font size, double the line height.
style={"fontSize": "0.4rem", "lineHeight": 3.75}
^this combination made your long IP fit in the box for me, but in my opinion it doesnāt look great, and I think fundamentally there just isnāt enough horizontal space in your current layout. I would suggest reorganising your content, perhaps into three rows where each row has a bit more horizontal space to fit everything in
@tcbegley Hello Mr. Tom,
happy new year, i hope all is good.
iām working only with dbc components lately, and i realize that without the external stylesheet is not working correctly on positioning the html content.
app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])
Bootstrap is styled with CSS, so that CSS needs to be linked in your app.
The CSS is not bundled automatically because there are many variants and themes for Bootstrap, so we give the user the choice to link whichever one they want.
Something that is not clear from documentation, html.Div is it the same as dbc.Container ?
They look to be functioning the same. What is your suggestion ?
A container is a div with certain CSS classes applied that add spacing and assist with layout. If youāre seeing no difference between that and a div it might be that the stylesheet hasnāt been linked correctly