ivamax9
ivamax9

Reputation: 2629

Html dynamic table via div

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.

Upvotes: 1

Views: 474

Answers (1)

Cisum Inas
Cisum Inas

Reputation: 12990

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>

Upvotes: 1

Related Questions