I've been woking with Jupyter widgets and i'm having problems with the alignment, for example, i have the next widgets:
from IPython.html import widgets as wdg
#Two Sliders
s1 = wdg.IntSlider(min=0,max=100,value=25,description='Xo')
s2 = wdg.IntSlider(min=0,max=100,value=25,description='Yo')
#Three Float Text
c1 = wdg.BoundedFloatText(min=0,max=100,value=5,description='C1 ')
c2 = wdg.BoundedFloatText(min=0,max=100,value=5,description='C2 ')
c3 = wdg.BoundedFloatText(min=0,max=100,value=5,description='C3 ')
#Two Checkbox
ch1 = wdg.Checkbox(description='Check me 1')
ch2 = wdg.Checkbox(description='Check me 2')
#Containers
Con1 = wdg.HBox(children=[s1,s2])
Con2 = wdg.HBox(children=[c1,c2,c3])
Con3 = wdg.HBox(children=[ch1,ch2])
Con5 = wdg.Box(children=[Con1,Con2,Con3])
in the output of Con5
, c1
,c2
and c3
are all together with no space between the float boxes so their descriptions are overlaped, how can i do to center them, or at least increase the space between them?
I confirmed 'margin' affects the spacing vertically and horizontally.
c1.margin=20
c2.margin=20
c3.margin=20
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With