0

I am wondering what is the best way to create this 3*2 "table" using DIVS?

simple 3*2 grid layout

I am really tempted to use simple tables code

<table>

as it would be easier, but the trend today is to use Divs. Therefore, what would be the best, elegant way to create something like this?

I always wondered why tables suddenly disappeared, I used to create websites using only tables (time ago).

web-tiki
  • 99,765
  • 32
  • 217
  • 249
MeV
  • 3,761
  • 11
  • 45
  • 78
  • 2
    What is going inside the boxes??? – Andrew May 28 '15 at 17:04
  • 5
    If you're displaying tabular data (like you'd find in a spreadsheet) then absolutely use a table. For layout and design, divs are the way to go. – wicker95 May 28 '15 at 17:04
  • Use CSS styles to simulate a table. Unless it's a data grid, in which case use a table. – Mr Lister May 28 '15 at 17:05
  • 3
    Andrew is asking the right question, what's going in there? If it's actual data which needs to be formatted,.. like well a table, then go with that! Forget trends, be practical. – Antonio Pavicevac-Ortiz May 28 '15 at 17:07
  • 2
    I wouldn't follow trends, but just consider function and base my choice upon that. – user2314737 May 28 '15 at 17:10
  • @Andrew Thanks for the message. There will be website content (images and structure for the website) therefore I think i should use divs and not table. – MeV May 28 '15 at 17:10
  • @wicker95 Thanks, I agree with you, totally, but I noticed developers hating tables nowadays, as if they were used only for old technology websites.. – MeV May 28 '15 at 17:14
  • @AntonioOrtiz thanks, agree! – MeV May 28 '15 at 17:14
  • @user2314737, same here. But still, I feel that tables looks too old today. Thank you – MeV May 28 '15 at 17:15
  • 1
    @MaRco85 Now you're seriously underestimating tables. Tables are wonderful, versatile, multi-purpose things that have gotten an undeserved bad rep in the last few years, and I really don't know why. I've seen people go so far as to invent new tag names that they style with CSS, just to avoid writing `` in their source. So wrong. Anyway, if you want to structure your website, I presume with things like side bars and the like, don't use tables. Use something responsive, like inline or floating blocks.
    – Mr Lister May 28 '15 at 17:59
  • 3
    There's nothing wrong with using `` when you are, in fact, creating a table. The only reason people say "use
    instead of
    " is because people used to format everything using
    . You are a creating a table, so use `
    `.
    – Andy Lester May 28 '15 at 20:25
  • 1
    I will admit that my first reaction to seeing tables used in HTML is usually bad, but there are valid uses. Search results with a lot of attached data points? Great use. Menu bars on top of the page? Bad example. There's a time and place, and we should all be careful about knee jerk reactions. – wicker95 May 29 '15 at 11:49
  • 2
    "There's nothing wrong with using when you are, in fact, creating a table." sorry @andy-lester , but this made me smile
    – user2314737 May 29 '15 at 12:01