css divide width 100% to 3 column

前端 未结 11 542
余生分开走
余生分开走 2020-12-12 21:38

I have a layout where I have 3 columns.

Therefore, I divide 100% by 3.

The result is obviously 33.333....

My goal is perfect

11条回答
  •  囚心锁ツ
    2020-12-12 22:37

    Just to present an alternative way to fix this problem (if you don't really care about supporting IE):

    A soft coded solution would be to use display: table (no support in IE7) along with table-layout: fixed (to ensure equal width columns).

    Read more about this here.

提交回复
热议问题