0

This has been resolved. I found this, and it works great for what I was trying to do.






Please forgive me, as I know this is a redundant question. However, I have tried several examples and tutorials, and can't get what I want.

I have a table, which is basically the following but repeating for a few thousand lines. I need to convert it to divs. The cells are not expanding to the parent, and when they have text, they all are different widths.

Example of how it needs to be (this is a classic table):

and here is what I have so far...

Here's a few lines of code because codepen isn't enough...

<html>
<head>
</head>
</html>

I am not good at all with tables. I am trying to make it mobile-friendly, which is why the cells are inline-block.

Any advice would be appreciated.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • If you're trying to make mobile friendly tables I would suggest giving footable a go, I use it on all my responsive tables http://themergency.com/footable/ – Aaron Apr 16 '15 at 14:34
  • Possible duplicate of [Make an inline-block div take 100% of the remaining width](https://stackoverflow.com/questions/17955720/make-an-inline-block-div-take-100-of-the-remaining-width) – Brian Tompsett - 汤莱恩 Oct 15 '17 at 21:30

2 Answers2

0

Try use bootstrap,u can search the tutorial at their site.

wijaya
  • 152
  • 7
0

You should be using a standard HTML <table> not faking functionality using <div> tags. I understand that you want to make this mobile friendly, but this isn't the best way to do it.

smekosh
  • 81
  • 3