dhempy
Posts: 40
|
Posted: 07/09/2004, 10:45 PM |
|
I'm designing a grid page to list rows. Instead of using an html <table>, I'm using an html Definition List <dl>.
I've tweaked the code in HTML mode to this:
<!-- BEGIN Grid calendar -->
<dl>
<!-- BEGIN Row -->
<dt>{event_date} </dt>
<dd>{event_description}</dd>
<!-- END Row -->
</dl>
<!-- END Grid calendar -->
However, if I hop over to Design Mode, do anything on the page (like adding a space to the very end of the document), and return to HTML mode, my code has been changed to this:
<!-- BEGIN Grid calendar -->
<dl>
<!-- BEGIN Row -->
<dt>{event_date}
<dd>{event_description} <!-- END Row --></dd>
</dl>
<!-- END Grid calendar -->
There are two problems with this: the <dt> tag is not closed, and the </dd> tag comes outside the END Row, so that only the last event description on the page has its <dd> tag closed.
This isn't really a problem with <dl> tags. It's really a question of CCS messing around with tags it does not understand. I suspect that's an unavoidable tradeoff of fine control for using such a powerful tool as CCS...but if there's a workaround or a setting that will keep the IDE's hands off my code, I'd sure like to hear about it.
Lovin' CCS,
-dave
ps. If you're not familiar with <dl> lists, check out http://www.w3.org/TR/REC-html40/struct/lists.html . They are incredibly handy for many typical database generated lists, particulary two-field lists with a title field and a multi-paragraph description field. They get along with style sheets much easier than most <table> solutions, and avoid many of the pitfalls of <table>s.
_________________
David Hempy
Director of Broadcast and Education Technology
Kentucky Educational Television
800-333-9764 |
|
|
dhempy
Posts: 40
|
Posted: 07/09/2004, 10:52 PM |
|
One more note...if I hand-arrange the template, save it, and publish the project, it does work correctly, with all the tags in the correct place. It's only when I go to Design mode and make any change that my tags get removed or relocated.
I could go to some gyrations preserving my code elsewhere each time, but I don't think that would work out to well...particularly if I made changes in Design mode that I actually wanted to stick.
Do any users avoid using Design mode for this reason? If so, do you do your basic work in Design mode, and then switch over at some point and don't go back to it?
FWIW,
-dave
_________________
David Hempy
Director of Broadcast and Education Technology
Kentucky Educational Television
800-333-9764 |
|
|
E43509
Posts: 283
|
Posted: 07/12/2004, 5:53 AM |
|
Thanks for introducing me to DL tag. I hadn't even given it a thought
|
|
|
dhempy
Posts: 40
|
Posted: 07/12/2004, 7:58 AM |
|
Quote E43509:
Thanks for introducing me to DL tag. I hadn't even given it a thought
You're welcome! I use them all the time. They are particularly handy for quick-and-dirty hand-coded forms that you'd like to look at least kinda nice, but don't want to bother creating a table, right-aligning the first column, dealing with really long field captions, etc. Just put the field caption in the <dt> and the form field in the <dd> and you're done. Voila!
-dave
ps. Of course, now that I'm a CodeCharge man, making pretty input forms isn't such a big deal any more...
_________________
David Hempy
Director of Broadcast and Education Technology
Kentucky Educational Television
800-333-9764 |
|
|
|