I am trying to make an IPython notebook more aesthetic by aligning input fields. These fields have some descriptors attached to them, and a few go over the minimum character limit.
I would like the text input boxes to be aligned such that the left side all align vertically.
Here is a simple ipython example,
from IPython.html import widgets # Widget definitions
from IPython.display import display # Used to display widgets in the notebook
small_widget = widgets.FloatTextWidget(description="Small:")
short_widget = widgets.FloatTextWidget(description="Also Short:")
long_widget = widgets.FloatTextWidget(description="Loooooooong:")
container = widgets.ContainerWidget(children=[small_widget,
short_widget, long_widget])
display(container)
You can see that for the Looooooong widget the label shifts the input box over considerably. I would like all of the other input boxes to also shift to the right to align.
Any suggestions on how to properly align these components (label, input box) of the FloatTextWidget? I have looked at the IPython notebook on aligning widgets but it applies to an entire widget as a whole, not the individual label and field.
A quick fix is to increase the label widths by altering the CSS using an
%%html
cell: