PDA

View Full Version : dynamic page numbers for a table of content



kieran491
Nov 9th, 2009, 08:35 AM
Hi there I'm looking at trying to create a dynamic page numbers for a table of content when my HTML document is been printed i thought this may be possible as your able to apply different style sheets when printing a document with CSS.

But I have the sneaking feeling that this may have to be a JavaScript task.

abduraooft
Nov 9th, 2009, 09:51 AM
Um.. you referred your document as "table of contents", though just wondering whether you can make use of ordered list (http://htmldog.com/reference/htmltags/ol/)?

kieran491
Nov 9th, 2009, 11:50 AM
You could make use of an ordered list but then the numbers don't actual line up with the page that the header is been printed on for example <h3>Heading I am </h3> could be on page 25 for example but if i had it in the ordered list that could be item 20 in the ordered list that doesn't actual line the page details up correctly

you also have to keep in mind that the page are dynamic there content is never on the same page twice depending on content size of course

abduraooft
Nov 9th, 2009, 11:58 AM
Sorry, I misread your post (thought your were talking about the serial numbers on left:o). I don't have an answerer to you.