|
How can I leave a margin on both sides of the page?
EXTRA ADVICE: Always make a background such as this 1281 pixels wide
so that it does not "repeat" across the page on wide screens. Since 1280
is the maximum width, 1281 does the trick! ALSO: be sure you
spell background as BACKGROUND! The most common bug here is to
spell it as BACKROUND missing the G!!!
example
|
This text stands off nicely from the edges of the screen. It will
adjust itself to consume 80% of the screen- no matter what the
size of the browser. This means that you will have 10% on each
side of the screen free of text. Keep in mind that your text
area will be shorter on high resolution displays and longer on
low resolution displays.
This is easy to do using the CENTER tags along with a minimal
TABLE. Do not set BORDER=0 as some browsers may set the
border to 1 on their own!
|
source code
<CENTER>
<TABLE WIDTH="80%" >
<TR>
<TD>
This text stands off nicely from the edges of the screen. It will
adjust itself to consume 80% of the screen- no matter what the
size of the browser. This means that you will have 10% on each
side of the screen free of text. Keep in mind that your text
area will be shorter on high resolution displays and longer on
low resolution displays.
<P>
This is easy to do using the CENTER tags along with a minimal
TABLE. Do not set <I>BORDER=0</I> as some browsers may set the
border to 1 on their own!
</TD>
</TR>
</TABLE>
</CENTER>
|