- From: Krzysztof Żelechowski <giecrilj@stegny.2a.pl>
- Date: Wed, 26 Mar 2008 17:22:08 +0100
Another example of missing interleave in HTML is not to be able to interleave list items with table rows in order to provide numbering. These are independent sets of elements and they cannot play together. Sad. Chris Dnia 25-03-2008, Wt o godzinie 20:44 +0100, Keryx Web pisze: > Some of you might have seen this, but accpording to the original author > there was no response. His suggestions make sense to me. I've been there > as well. > > Lars Gunther > > This is from Thomas Thomassen on WSG's list: > > ------------ > I was working on some examples for the use of <del> and <ins>. > http://www.thomthom.net/blog/2008/03/document-history-viewer-making-use-of-del-and-ins/ > > As I was working on this I wanted to mark up a list where items had been > added and removed. That's when I realised that you can't wrap up <li> > <dt> or <dd> in <del> or <ins> elements because <ul>, <ol> and <dl> only > allows list items as their direct child. > > The <del> and <ins> then have to be wrapped inside the list item. > > <ul> > <li>Item 1</li> > <li><del>Item 2</del></li> > <li>Item 3</li> > </ul> > > When I hid the <del> using display: hidden; the list would render > something like this: > > * Item 1 > * > * Item 3 > > Because I could wrap up the entire list item, the bullet point would > still remain. > > To me it appears illogical to not wrap the <del> or <ins> around the > list items when you add and remove items to the list. I'm guessing it's > a case where every scenario wasn't accounted for when the specifications > was written. (Yes, I know that I could add an extra class to the list > item that I wanted to hide, but it's not the point. It shouldn't be > necessary.) > > However, when this scenario presents itself I see it as fine to break > the specification and mark it up like this: > <ul> > <li>Item 1</li> > <del><li>Item 2</li></del> > <li>Item 3</li> > </ul> > > This seem to render exactly as I expect it to do in every browser I've > tested. > > * Item 1 > * Item 3 > >
Received on Wednesday, 26 March 2008 09:22:08 UTC