A
A. Shiraz
Ok, here is a problem.
How would I display line numbers next a text displayed in a web
browser?
The problem is that web browsers wrap the text as desired
(automatically) so a word can be on line 5 in one sized browser and the
same word can spill over to line 6 in a differently sized browser.
Right? Ok!
But we can control this wrapping functionality by putting the text in a
table cell and restricting the size of the table, right? OK! but how do
we tell how the table will display the text? Meaning how do we know the
line number a certain word will fall in?
Here is an example. Supppose I have a passage "I want to find the line
number that the word IT is on, by line number I mean the line number
that the word IT will fall on when the browser displays the passage
wrapping this passage over three lines maybe four; the browser could
even display the sentence in a table which will ensure that the
sentence is displayed consistently but how will I know where IT will
fall in the table? Will IT fall on first line? given the size of the
table? will IT fall on the fourth? How to be able to know
programmatically the line number of the word IT will be located at?"
Now as the passage mentions how can I predict the line number that IT
will fall on when viewed on the browser screen EVEN if the display of
the passage is controlled by table size?
A
How would I display line numbers next a text displayed in a web
browser?
The problem is that web browsers wrap the text as desired
(automatically) so a word can be on line 5 in one sized browser and the
same word can spill over to line 6 in a differently sized browser.
Right? Ok!
But we can control this wrapping functionality by putting the text in a
table cell and restricting the size of the table, right? OK! but how do
we tell how the table will display the text? Meaning how do we know the
line number a certain word will fall in?
Here is an example. Supppose I have a passage "I want to find the line
number that the word IT is on, by line number I mean the line number
that the word IT will fall on when the browser displays the passage
wrapping this passage over three lines maybe four; the browser could
even display the sentence in a table which will ensure that the
sentence is displayed consistently but how will I know where IT will
fall in the table? Will IT fall on first line? given the size of the
table? will IT fall on the fourth? How to be able to know
programmatically the line number of the word IT will be located at?"
Now as the passage mentions how can I predict the line number that IT
will fall on when viewed on the browser screen EVEN if the display of
the passage is controlled by table size?
A