HTML advice (was: Re: Hello, I'm new too)
From: | Irina Rempt <ira@...> |
Date: | Monday, October 23, 2000, 5:43 |
On Sun, 22 Oct 2000, Andrew Chaney wrote:
> >What a lovely website! Very nice layout. If there's
> >anything to say, you might want to center it on the
> >page, but that's only IMVHO.
>
> I could I guess center it (Maybe with a <P ALIGN="CENTER"> around
> the whole page, but wouldn't work in Netscape on some UNIXes. I
> could use a <CENTER> tag but that would violate the HTML 4.0
> standard and I don't feel like going and converting everything to
> HTML 3.2...)
(Please watch your line length! All of this paragraph was one long
line).
Or give it margins. To cater for different browsers with different
tastes, you need both the <marginwidth> and <leftmargin> attributes.
which do the same thing:
<body marginwidth="50" leftmargin="50">
or whatever number of pixels you prefer.
You can also put it in a table with three cells, the left and right
ones with fixed width and no contents (or a simple repeating graphic,
or a background colour, for contrast) and the middle one with
variable width and your text in it. If you put one in the
empty cells IE won't collapse them and Netscape won't show them as a
solid block of border, which they do when you leave them truly empty.
Turn your borders off <table border="0"> if you don't want the table
structure to show.
Horizontal centering works the same way: either you use
<body marginheight="50" topmargin="50">
(topmargin and leftmargin also take care of bottom and right margins)
or make a nine-cell table, like this:
text
You can achieve the same effect with frames but that would mean that
not everybody can easily read it, so frames are better kept for when
you *really* need them. If you're using frames already (I haven't
seen your page yet) you can just go ahead and use them for this as
well, of course.
Irina
--
Varsinen an laynynay, saraz no arlet rastynay.
irina@valdyas.org (myself) http://www.valdyas.org/irina/valdyas