[css-d] [Printing problems with DL/DT/DD for numbered paragraphs] rides again...
Friends, This is a continuation of the page looks fine but printing is screwed up thread... In response to the suggestion from Peter Williams I removed the xml line from the top of the file. I appreciate the suggestion and the education, but it has made no difference in the outcome. The illustrative sample (http://www.h4c.org/testing/test-case.html) validates, and has its CSS in-line. I'm satisfied with this general approach (using definition lists) for having numbered text paragraphs, as it appears to scale well, given that even what I would think of as ridiculously large font sizes (e.g. 38 px) for visually impaired users. Likewise, it requires only a bare minimum of markup to achieve the desired result, in contrast to the use of tables, and in fact even in contrast to the use of floated divs. Note that in this instance, since the numbers are not properly part of the text, I wanted to distinguish that visually; an ordinary OL would not allow that, and in any case the material with which I am working offers a lot of complexities. Not every document can be numbered in simple numeric sequence, and aesthetically I prefer to choose one solution that will handle all situations, rather than having several solutions, depending... (It is certainly not essential to the technical issues, but if anyone is interested, a more complex, real-world example of how I intend to use this is found at http://www.h4c.org/testing/html/20020410.html. I've no doubt made some tyro errors, but I've tried to keep everything proportional for future scaling via JS and manipulations of the CSS.) If the problems with printing can be solved, it looks as though this approach could provide a useful solution to certain classes of multiple item, two column text problems, such as building questionnaires, offering screenplays, etc. Those of us who come to this list, hat in hand, should expect to give something back. Perhaps this approach would be of modest use to others, assuming that the printing problems are resolved/resolvable. The overall cannot print difficulty, I am well nigh convinced, has to do with the user agent wanting to put the entire definition list on one page-- treating it as one unit-- and as such short test cases (1 page) do not demonstrate it. (It makes some modest sense to me that the UAs would try to keep the contents of a DT/DD pair together on one page, but the whole list??) When trying to print a longer definition list-- i.e. which exceeds one page-- the UAs are (mostly) acting thus (http://www.w3.org/TR/css-print/#s.8.2): If page-break-inside: avoid is specified for a long element and the printer is unable to buffer the entire element before committing it to paper, it SHOULD force a page break to occur before the long element and begin the element starting at the top of the next page. If the long element starts at the top of a page and exceeds the page length, the printer SHALL print as much as possible on the first page and then resume that element on the next and subsequent pages as REQUIRED to preserve the content. As I said, both FF and IE (1.0.4 and 6.0.2 on XP; test browsers most readily available to me) appear to consider the whole definition list as one long element, and are only mostly following the process listed in the spec (albeit I've not found any spec that specifies this behavior for definition lists). In other words, it seems that both IE and FF try to assemble the page, but, for a long list with the CSS as last submitted (i.e. http://archivist.incutio.com/viewlist/css-discuss/59495), these UAs want to put a page break as the first element of every page-- and so they loop. Different buggy output occurs-- a few all blank pages; far too many blank pages; FF freezing; strange page breaks; truncated printout of the list; etc.-- depending on the specifics of the CSS used (i.e. using page-break-inside:auto; in the DL element, or using page-break-after: always; in the DD element)... I've not found anything via Google et al about what should happen with a 1 page definition list, nor about this specific problem. Anyone? I have found several ways to avoid having FF freeze as it ponders the problem of its infinite must put all this on the next page loop (the best one is shown in the in-line CSS), but so far, no joy at getting what would seem to be the desired result, which is pages with text that are well filled within the margins specified by the browser... The present sample will not freeze FF, but removing the page-break directive from the CSS will cause that... Thoughts? If this can be fixed, then great, but if not, would anyone out there in expert land wish to venture an opine about other/better ways to accomplish the overall goal, which is having numbered text paragraphs. d. David William House AllHear, Inc. P.O. Box 330 / 23022 Yeary Lane N.E. Aurora, OR 97002-0330 USA (503) 266-6730 (voice) / (503)
RE: [css-d] [Printing problems with DL/DT/DD for numbered paragraphs] rides again...
From: Pringle, Ron ...I don't see the logic or reason behind the use of a definition list for numbered paragraphs. As you have it now, the dt has little meaning or relation to the dd. SNIP Better yet, designate each number as a header (h2, h3, whatever) and follow it with the paragraph. I think the header/paragraph would make the most sense in a non-visual way. David, When I was managing a large collection of policy and instructional documents (where the authors of the original MS Word versions just loved numbered paragraphs) I used a H4 P combo as suggested by Ron. I agree with him that, sematically, your DL method is less than optimal. You really should *describe* the document elements with your markup, not just use what allows pleasing appearance in some output media. This part of the discussions is off-topic though, so I don't think we can progress it here. webdesign-l is a place where you will get considered and practices opinions on the markup choices that could best suit your purpose, and which may also allow for styling the output in ways that satisfy your desire for a certain layout. http://www.webdesign-l.com/ -- Peter Williams __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
RE: [css-d] [Printing problems with DL/DT/DD for numbered paragraphs] rides again...
From: T. R. Valentine A hanging-indent can be achieved by using the text-indent property and assigning it a negative value. What would be tricky in the above would be aligning the beginning of the text following the number with the left edge of the other lines. Back on css topic :-) How about the css2 first-line pseudo-element? 5.12.1 The :first-line pseudo-element The :first-line pseudo-element applies special styles to the first formatted line of a paragraph. For instance: p:first-line { set your hanging indent here; } You'd need to test the bowser support amongst your intended user base. -- Peter Williams __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
[css-d] Printing problems with DL/DT/DD for numbered paragraphs...
Friends, I maintain a site that has a substantial number of documents which have numbered paragraphs. I am moving the site from a table oriented to a simpler structure using DL/DT/DD, and it appears to display well in the browsers that I have access to (IE 6.0.2 Win XP and FF 1.0.4, same OS). The problem is printing. I either get pages that have no content (IE), or the browser freezes while trying to render the pages (FF). (I use print preview rather than using up paper...) Its the real world and things are complex, and I may be climbing the wrong tree, but the pages print when print.css is not linked. Progressively commenting out portions of the code therein and trying again, ultimately demonstrates that when the one statement float: left in the definition within print.css for the DT is commented out, the pages print, but of course the numbers are above each of their corresponding paragraphs. The particular styles which give me the proper display of numbered paragraphs in the definition list (modified from an example at http://webboy.net/presentation/definition/dl-table-display.htm to enable a wider range of font sizes) are as follows, in both the screen.css and print.css are: /* Main numbered text layout */ dl.NumberedText { width: 100%; margin: 2em 0 0 0; padding: 0; } dl.NumberedText dt { width: 6%; /* if the next line is commented out in print.css, no crashing... */ float: left; margin: .75em 0 0 0; padding: 0 .5em 0 0; font-size: 60%; line-height : 300%; */ font-family:Verdana, Arial, Helvetica, sans-serif; text-align: right; } /* commented backslash hack for mac-ie5 \*/ dl.NumberedText dt { clear: both; } /* end hack */ dl.NumberedText dd { float: left; width: 92%; margin: .75em 0 0 0; padding: 0 0 0 0; text-indent: 1.5%; } The HTML (greatly simplified) would be: ?xml version=1.0? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; body dl class=NumberedText dt1./dt ddThis is paragraph number one, as shown by the number to the left.../dd /dl /body /html The site itself is password protected, and it uses a JS menu system which licensed to that one url. Thus, I have gone to a different domain to put up an example. Because it would not work anyway, I have not put the menu script up and because there are only a few files in the test directory, none of the links will work, but if you want to see an example direct from the site, warts and all, I have put a quasi-real world page up at http://www.h4c.org/testing/html/20020410.html. The CSS for printing is found at http://www.h4c.org/testing/css/print.css. For the screen display the CSS is at http://www.h4c.org/testing/css/screen.css Any ideas? What's the deal? d. David William House AllHear, Inc. P.O. Box 330 / 23022 Yeary Lane N.E. Aurora, OR 97002-0330 USA (503) 266-6730 (voice) / (503) 266-6418 (fax) [EMAIL PROTECTED] (e-mail) http://www.AllHear.com (corporate web site) Make no search for water. But find thirst, And water from the very ground will burst. (Rumi, a Persian mystic poet, quoted in Delight of Hearts, p. 77) __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Printing problems with DL/DT/DD for numbered paragraphs...
Try again with the HTML (spaces added to prevent display in web aware email)... At 06:49 PM 6/26/2005, [EMAIL PROTECTED] wrote: The HTML (greatly simplified) would be: ?xml version=1.0? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; body dl class=NumberedText dt1./dt ddThis is paragraph number one, as shown by the number to the left.../dd /dl /body /html David William House AllHear, Inc. P.O. Box 330 / 23022 Yeary Lane N.E. Aurora, OR 97002-0330 USA (503) 266-6730 (voice) / (503) 266-6418 (fax) [EMAIL PROTECTED] (e-mail) http://www.AllHear.com (corporate web site) Make no search for water. But find thirst, And water from the very ground will burst. (Rumi, a Persian mystic poet, quoted in Delight of Hearts, p. 77) __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Printing problems with DL/DT/DD for numbered paragraphs...
Peter Williams wrote: From: [EMAIL PROTECTED] ?xml version=1.0? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; Remove the xml prolog and see if the behaviour is better, as far as I'm aware it is unusable in todays browsers. IE goes into quirks mode with anything before the doctype dec. I don't think it's the prolog in this case...I was unaware that you could use a float in a print page... You know, this is precisely what counters are supposed to be for...damned IE... -- http://www.mozilla.org/products/firefox/ - Get Firefox! http://www.mozilla.org/products/thunderbird/ - Reclaim Your Inbox! __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
RE: [css-d] Printing problems with DL/DT/DD for numbered paragraphs...
From: Kelly Miller I don't think it's the prolog in this case...I was unaware that you could use a float in a print page... Kelly, I setup a quick text page and my markup was: dl dt1./dt ddThis is the first numbered paragraph, done by using a dl with numbers at the dt and the para text as the dd./dd /dl Accompanying css was: dt {float: left;} All good on-screen in IE6 and FF1.04 on Win XP, all good when printed too. It might not be strictly supported, but it did work in practice. Next test would be the same css in a media=print stylesheet. -- Peter Williams __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
RE: [css-d] Printing problems with DL/DT/DD for numbered paragraphs...
I've done a second test, using media=print and changing the typeface and hiding another element on my test page, the float still works and the numbers are still left of the dd text in IE6 and FF1.04, in print preview and when printed. Same markup as before and same css float directive as before, just with the typeface mod to prove the print stylesheet has been used. -- Peter Williams __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/