Forums

This topic is locked

Newbie page border question

Posted 25 Apr 2004 02:10:19
1
has voted
25 Apr 2004 02:10:19 Bob Rindy posted:
So far I have read about tables and frames, but not sure what the best way is to do the following:

I want to have a narrow border around my page ( lets say about 1/2" all around ), that will "auto-resize" depending on the user's current resolution.

I know that a cell in a table can be set to 100%, and that it will "auto-size" according to browser window size.

What I'd like to know from you non-newbies out there is just what is the most efficient way to do this?

Should I use a frame or a table, or is there some way to simply have an autosizing border without using either.

All advice appreciated ( except the ones that tell me to RTFM, which I have been doing ).

Follow the money.....

Replies

Replied 25 Apr 2004 03:59:16
25 Apr 2004 03:59:16 Phil Shevlin replied:
You would use tables or layers -- not frames (tho it is possible - just ugly).

<b>With tables: </b>
<pre id=code><font face=courier size=2 id=code>
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;style type="text/css"&gt;
&lt;!--
.bordercell {
background-color: #000000;
}
--&gt;
&lt;/style&gt;
&lt;/head&gt;

&lt;body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"&gt;
&lt;table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"&gt;
&lt;tr&gt;
&lt;td width="30" height="30" class="bordercell"&gt; &lt;/td&gt;
&lt;td height="30" class="bordercell"&gt; &lt;/td&gt;
&lt;td width="30" height="30" class="bordercell"&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="30" class="bordercell"&gt; &lt;/td&gt;
&lt;td valign="top"&gt;Place your content here&lt;/td&gt;
&lt;td width="30" class="bordercell"&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="30" height="30" class="bordercell"&gt; &lt;/td&gt;
&lt;td height="30" class="bordercell"&gt; &lt;/td&gt;
&lt;td width="30" height="30" class="bordercell"&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</font id=code></pre id=code>
<b>With layers: </b>
<pre id=code><font face=courier size=2 id=code>
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;script language="JavaScript" type="text/JavaScript"&gt;
&lt;!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape"&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//--&gt;
&lt;/script&gt;
&lt;/head&gt;

&lt;body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"&gt;
&lt;div id="Layer1" style="position:absolute; width:100%; height:100%; z-index:1; background-color: #000000; layer-background-color: #000000; border: 1px none #000000;"&gt;
&lt;div id="Layer2" style="position:absolute; width:92%; height:92%; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000; left: 4%; top: 4%;"&gt;Place
your content here&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</font id=code></pre id=code>
Bear in mind these are simple examples.

Edited by - wdglide on 25 Apr 2004 04:00:15
Replied 26 Apr 2004 00:31:51
26 Apr 2004 00:31:51 Bob Rindy replied:
Thank you very much wdglide, for your considerable time in that reply.
I will try both, and see which I like best.


Follow the money.....
Replied 26 Apr 2004 14:26:33
26 Apr 2004 14:26:33 Vince Baker replied:
Just to add to wdglide's comments, although most browsers are now starting to support layers all browsers support tables.

This means that if you use tables you can be sure that every user will see the same. Some browsers are still somewhat lackinng in equal layer support.



Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 27 Apr 2004 02:37:49
27 Apr 2004 02:37:49 Bob Rindy replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Just to add to wdglide's comments, although most browsers are now starting to support layers all browsers support tables.

This means that if you use tables you can be sure that every user will see the same. Some browsers are still somewhat lackinng in equal layer support.



Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Good comment,
I thank you

Follow the money.....

Reply to this topic