> -----Original Message----- > From: [email protected] [mailto:css-d- > [email protected]] On Behalf Of Geoff Lane > Sent: Friday, February 18, 2011 1:26 PM > To: CSS Discussion > Subject: [css-d] How to replace tables? > > Hi All, > > I'm at my wit's end. I've started putting together an AJAX-driven site > (on local servers only right now) and one of my call-back scripts needs > to update a few rows of a table. So I tried encapsulating the affected > rows in a DIV, but when I update that the old table rows remain and > the new table rows appear almost as running text above the table. This > is HTML 4.01 Transitional and the W3C validator tells me that I'm doing > it wrong as the DOM doesn't allow a structure like: > </tr><div><tr></tr></div><tr>. Unfortunately, I can't update the > entire table as it contains stuff that isn't known to the server-side > script. >
While CSS might be able to come to the rescue, the thing that occurs to me immediately is <tbody>. <tbody> is the oft-ignored/forgotten row container element. You can have as many <tbody>s as you want in a table. so you'd have <table> <tbody><tr></tr><tr></tr></tbody> <tbody id="ajax_container"><tr></tr></tbody> ... </table> No need to go crazy with the divs and the table layout properties. ---Tim ______________________________________________________________________ css-discuss [[email protected]] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
