Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Right here on HN is an example, where the comment reply chain is indicated with indentation.

    <div class=comment>
      <span class=user>T-hawk</span>
      Right here on HN is an example, where the comment reply chain is indicated with indentation.
      <div class=replies>
        <div class=comment>
          <span class=user>random28345</span>
          HTML is a tree of element nodes, the identity of the post being replied to can be determined by 
          the position of element in the tree 
          <div class=replies />
        </div>  
      </div>  
    </div>
----------------------

    .replies {
      margin-left: 2em;
    }


Exactly what I thought. The CSS make a visual indentation, but carries no more semantic than the data structure does already.

In fact, if it did, I would consider the HTML broken.

    <div class=comment.level1>
    ...
    </div>
    <div class=comment.level2>
    ...
    </div




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: