-1

I am looking for a div table, with 4 columns and 4 rows.

I would like the width to be 100%, I would like to insert images and text into each div.

Can anyone help?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • 1
    Why not use then? Also set up a jsfiddle where we see what you have tried so far
    – RononDex Jan 13 '14 at 08:43
  • change display properties for divs like here http://jsfiddle.net/amcPM/1/ – GL.awog Jan 13 '14 at 08:50
  • possible duplicate of [How do I make a grid with Html and CSS with DIVS](http://stackoverflow.com/questions/21014209/how-do-i-make-a-grid-with-html-and-css-with-divs) – Benjamin Jan 13 '14 at 09:31

1 Answers1

2

If you need to show tabular data, just use a table. If you want it to be responsive you might use this as a layout: example

.row{
    clear: both;
    width: 100%;
    margin: 0px;
    padding: 0px;
}

.cell{
    float: left;
    min-height: 100px;
    width: 24%;
    border: 1px solid black;
    text-align: center;
    min-width: 100px;
}

Note: I set the minimum width of a cell to 100px so it won't be too small - that's the advantage of using divs instead of a table. If you don't won't the structure to break in small display, you really should use a table.

Itay Gal
  • 10,706
  • 6
  • 36
  • 75