Newbie page border question

liunx

Guest
So far I have read about tables and frames, but not sure what the best way is to do the following:<br />
<br />
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.<br />
<br />
I know that a cell in a table can be set to 100%, and that it will "auto-size" according to browser window size.<br />
<br />
What I'd like to know from you non-newbies out there is just what is the most efficient way to do this?<br />
<br />
Should I use a frame or a table, or is there some way to simply have an autosizing border without using either.<br />
<br />
All advice appreciated ( except the ones that tell me to RTFM, which I have been doing ). :confused:<!--content-->No frames..<br />
<br />
In your <head> section, include...<br />
<style type="text/css"><br />
body {<br />
margin:2%;<br />
}<br />
</style><br />
Change the percent value to what you need.<!--content-->This is the way I would do it. I don't mind comments.<br />
<br />
<body bgcolor="#80ffff" text="#004080"><br />
<div align="center"><br />
<table width="95%"height="95%" border="1" cellspacing="0" cellpadding="10" bgcolor="#80ffff" bordercolor="#000000"><br />
<tr><br />
<td ><br />
<div align="justify"> You can make a frame around your page using the table settings themselves. IE and NS will show them slightly different because of the scrollbar. <br>IE shown it even if there is no scroll. NS don't show it, but extends the background color, making the table look off center.<br><br />
Feel free to change any of the table settings.</div><br />
</td><br />
</tr><br />
</table></div><!--content-->i like Nedals' way better<!--content-->Did you run it?<br />
It does not center. I think it needs more code.<!--content-->Originally posted by jdavia <br />
Did you run it?<br />
It does not center. I think it needs more code. <br />
Try it with that 'inner' <div> only (not the table) that you included with your post. <br />
The original poster did not request a centering method.<br />
Originally posted by grindy<br />
I want to have a narrow border around my page<!--content-->Well since you don't mind comments, there is no tabular data so a table is the wrong markup. Align is a deprecated attribute. Also, the text in your div should be in paragraphs rather than raw with breaks.<!--content-->Thanks for the comments, but,<br />
there is no tabular data so a table is the wrong markup.<br />
Demonstrate it. He is asking about tables.<br />
<br />
Align is a deprecated attribute. It still works though. Show an attribute that replaces it.<br />
<br />
Also, the text in your div should be in paragraphs rather than raw with breaks<br />
I didn't want a new paragraph, just a line break. The text wasn't grindy's question, the border was.<br />
Just exactly how would you do it?<!--content-->Demonstrate it. He is asking about tables. No, he's asking about layout.<br />
It still works though. Show an attribute that replaces it. Look up "deprecated". It is replace by the text-align style.<br />
I didn't want a new paragraph, just a line break. Whether you wanted it or not, what you PUT there was a paragraph and should be marked up as such.<br />
Just exactly how would you do it? The way nedals did except I would've put margin: .5in; because that's what he asked for.<!--content-->Only one comment: it is considered good practice to apply whatever rules you have to the <body>, to <html> as well because when served as an application of XML they simply aren't the same thing so you may get undesired results.<style type="text/css"><br />
/*<![CDATA[*/<br />
html, body { margin: .5in; }<br />
/*]]>*/<br />
</style><!--content-->Originally posted by ray326 <br />
The way nedals did except I would've put margin: .5in; because that's what he asked for. <br />
Not Quite! :)<br />
Originally posted by grindy<br />
...( lets say about 1/2" all around ), that will "auto-resize" depending on the user's current resolution.<!--content-->Forgive me, but I just love it when the experts challange each other...<br />
It's when I really learn the MOST !<br />
<br />
I truly thank all of you:)<!--content-->Originally posted by Nedals <br />
Not Quite! :) I defer to the more accurate reader. ;)<!--content-->
 
Back
Top