1

How create table via div which always centered their cells. I mean, if width for example 302 px, table show 3 divs in one line with width of 90px, and space between those divs and border are equal (8px). And if table width changed to 210px, 2 div will shown in one line with equal space (10px), and third div will move to the next line. Window width is dynamic.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
ivamax9
  • 2,601
  • 24
  • 33

1 Answers1

1

I would suggest using css and frameworks such as: twitter bootstrap or zurb foundationn, Check this out to get the overlaying image about responsive frameworks these have pre-set setups but you can also modify them to your liking..

You would need to change

x,y,z 

to suit you because I don't exactly follow your math, HTML tables are out dated and should not be used!

<div class="row">
    <div class="col-md-x">.col-md-4</div>
    <div class="col-md-y">.col-md-4</div>
    <div class="col-md-z">.col-md-4</div>
  </div>
Community
  • 1
  • 1
Cisum Inas
  • 11,552
  • 11
  • 40
  • 55