|
Posted by Jukka K. Korpela on 05/09/06 15:14
"Fred" <testing@testing1212mouse.com> wrote:
> On a page with all text, when the lines wrap at the right, some words butt
> right up to the very edge of the screen. This makes it look like the text
> runs off the screen, even though it doesn't.
You seem to think that the page is viewed in fullscreen mode. That's surely
possible, but you should think in terms of a _window_ or, most appropriately,
_canvas_ (the part of window or paper or other presentation area that is
allocated for rendering the document).
> I think I have seen code that makes the text take up only a certain amount
> of the screen -- say 95%. Can someone pls give me a hand on this?
That would be possible, but you really don't want that. In most browsers,
there is small but usually sufficient padding between the page content and
the canvas edge. Have you done something to remove it?
But if you think the default padding is insufficient, you can use a little
piece of CSS to suggest something slightly different, e.g.
<style type="text/css">
body { margin: 0;
padding: 0.4em 1em 0.4em 1.5em; }
</style>
This sets the top and and bottom padding to 0.4em, right padding to 1em and
left padding to 1.5em, which should be (more than) sufficient. The em unit
roughly corresponds to 2 or 2.5 times the average width of a character.
Followups rationalized.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
[Back to original message]
|