How to style and align forms without tables?

前端 未结 11 2450
梦如初夏
梦如初夏 2020-12-05 04:27

I\'ve gotten used to using

s for aligning my form fields perfectly. This is how I commonly write my forms:

11条回答
  •  臣服心动
    2020-12-05 05:02

    If you don't use tables you need to know the width of your labels upfront. This can often be a problem for multi-language sites (i18n).

    With tables, they stretch to fit labels of differing sizes. CSS alone can't do that yet in a well-supported way.

提交回复
热议问题