float:left; vs display:inline; vs display:inline-block; vs display:table-cell;

后端 未结 6 1396
野趣味
野趣味 2020-11-22 07:40

My Question(s)

  1. Are any of these methods preferred by a professional web designer?

  2. Are any of these methods prefereed by a web browser when

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 08:14

    For the record only, to add to Spudley's answer, there is also the possibility to use position: absolute and margins if you know the column widths.

    For me, the main issue when chossing a method is whether you need the columns to fill the whole height (equal heights), where table-cell is the easiest method (if you don't care much for older browsers).

提交回复
热议问题