Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other How to change table layout to div layout

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #150449
    majidkhan
    Participant

    I need to change the table layout to div layout and need to apply zebra stripping. For zebra stripping I need to group some of the divs. Here is what I need. What are the hacks that most professionals do? Thanks for your help in advance!

    Kan

    #150454
    Paulie_D
    Member

    If you are displaying data like that then a table would be appropriate.

    Is there really a specific need to make this into a div layout?

    #150458
    Paulie_D
    Member

    Basically, using the structure you have it’s almost impossible to apply CSS to shade the rows as you have done without a shed-full if nth-of-type statements.

    If you were to add columns, it gets much easier.

    http://codepen.io/Paulie-D/pen/ezvgb

    #150465
    Senff
    Participant

    What are the hacks that most professionals do?

    Professionals don’t do hacks.

    #150466
    majidkhan
    Participant

    Actually the data comes from database in a single variable. If I print that variable it prints that table. And there are a lot of tables like that. If I need to add some HTML elements then I have to edit that structure manually.

    #150468
    Paulie_D
    Member

    Actually the data comes from database in a single variable. If I print that variable it prints that table. And there are a lot of tables like that. If I need to add some HTML elements then I have to edit that structure manually.

    As I said, it looks to me as though a table would be appropriate.

    Are you saying that you can get the variable to print our divs etc instead of tables?

    I’m confused.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Other’ is closed to new topics and replies.