I am making webpage where data from database are put in a table. Each row has 3 columns. I want each row to be clickable however it is not possible since you cannot encapsulate a table row with anchor. There are some solutions around but I want to skip these tricks and use divs as rows. In each div, I can put three floated inline-block divs as columns to get the same result. But is there a way to avoid 3 column-like divs in this example? Just one div for each row with 3 text parts (columns in deed) aligned vertically like in a normal html table? I have desperately tried str_pad in PHP and it solves a different issue.
Share
Mehmed,
Try this…
[HTML]
[CSS]
Then in JQuery you can just do a click event on the rows class and get it’s ID to traverse through it’s child elements. This makes the entire row clickable. You can also do somethings with the columns if you’d like.
[JQuery]
This should be a good start for you, Mehmed…