Resolve textbox width hack

Use flex instead of trying to calculate sizes.