4 ms·
Instead of numbering the articles, you should put them in an OL instead of a UL, then you'll get automatic browser generated numbers and save a few more bytes.
by hellweaver666 14y ago
Instead of numbering the articles, you should put them in an OL instead of a UL, then you'll get automatic browser generated numbers and save a few more bytes.
- sergiotapia 14y agoHow would that work exactly? That would make the HTML really cumbersome and clunky. Normally I'd agree, but in this case, imagine you're using a View engine to render the html against populated objects, it's easier to just output the number and not rely on the browser. Can you illustrate what you mean?
- ricardobeat 14y ago<ol> <li class="post> <button class="upvote">▲</button> <strong>India outsourcing back to USA</strong> <span class="source">(shhhh.org)</span> <div class="stats"> ... </div> </li> ... </ol>
- btilly 14y agoThis change would also make a line wrap on a narrow interface wrap to the right of the number, helping the numbers stand out.
- jurre 14y agoThat would only work on the front page though, wouldn't it? Once you click the "more" link it would just start from 1 again.
- ehsanu1 14y agoJust a note: they're not in a UL currently, but each post is in a DIV.post.