Forums

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

Home Forums CSS unable to create css table if useless divs are in place

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34915
    davidagraf
    Member

    Hello

    I am having some foreign html and would like to format it with a css table. Unfortunately, the html contains an additional div between the “tabular-row-divs” and the “tabular-cell-divs”.

    Example:
    html:

      










    something


    display: table-celllllllllllllllllllll;


    cellllllllllllllllllll


    My current css:

    div .tabular {display: table;  padding: 5px;}
    div .tabular-row {display: table-row;}
    div .tabular-cell {display: table-cell; padding: 5px; }

    Unfortunately, I am not able to make the table work because of the div with the class “useless”. I am also not able to find a solution via google, although I think it is trivial. Can you help me?

    David

    #89710
    TheDoc
    Member

    If you are literally trying to build a table… why not just use a table?

    #89715
    chrisburton
    Participant

    @TheDoc is right. The reason we advocate against using tables is because people tend to use them for layouts instead of CSS. In your case as it appears, a table is a nice fit.

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