Possible to set the width of a Textbox in pixels?

I’m trying to minimize the width of two textboxes within a row, since they’ll only hold 5 digits at most.

Is it possible to adjust the width (aka set the max width) for a Textbox within a Row? I tried injecting css into the first Textbox component but nothing changed.

Thanks

        with gr.Row():
            gr.HTML(value='<p>Invert colors if your image has white background.<br >Change your brush width to make it thinner if you want to draw something.<br ></p>')
            gr.Textbox(css="{width: 100px;}", visible=True, show_label=False, placeholder='Width', elem_id='image_width')
            gr.Textbox(visible=True, show_label=False, placeholder='Height', elem_id='image_height')
1 Like