David Teller wrote:
Quote:
I'm attempting to get a website to look like a book. Among other
things, it means that I don't want half-lines of text to appear at the
bottom/top of my screen. Rather, when a line doesn't fit vertically in
the display, I want it to simply disappear. This is something that
every word processor does by pushing the whole line to the next page,
but I have trouble doing it with CSS.
Word processors and page layout programs have the advantage that the
|
layout space has fixed dimensions. The page size, font size, positioning,
etc., are all controllable factors.
This is not the case for a web page. None of those factors are known a
priori. Attempts to constrain any of those elements works only for those
limited conditions and the layout usually degrades quickly outside of
those constraints.
You do not know how a particular browser is configured. The text size
may be made much larger for someone with limited vision; the viewport may
be very narrow.
Given your example your best choice is to make the block containing the
text adapt to the amount of text in the block rather than trim the text.
Design your layout for the WWW, not a book.
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)