Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Novice with a simple question

Status
Not open for further replies.

WhiteElephant

Technical User
Oct 26, 2001
8
US
I'm new to HTML. I'm learning what I can online. Here is my simple question: Is the entire layout of a page built out of the table command?

I can make simple tables, and I can use the align= (element?) to move it to the center but, it's always at the top. What if I want it right in the middle of the page?

I often look at the source code of pages I visit to see if I can glean anything from them but, this seemingly simple piece continues to elude me.

If anyone has the patience to answer this I'd appreciate it.
 
You can make nested table (a table in a table). Then you can use the &quot;valign&quot; attribute in the <TD> tag.

<table width=&quot;600&quot; height=&quot;600&quot; border=&quot;2&quot;>
<tr>
<td align=&quot;right&quot; valign=&quot;top&quot;>
<table border=&quot;4&quot;>
<tr>
<td >top right text
</td>
</tr>
</table>
</td>
<td align=&quot;center&quot; valign=&quot;middle&quot;>
<table border=&quot;4&quot;>
<tr>
<td >middle text
</td>
</tr>
</table>
</td>
<td align=&quot;left&quot; valign=&quot;bottom&quot;>
<table border=&quot;4&quot;>
<tr>
<td >bottom left text
</td>
</tr>
</table>
</td>
</tr>
</table>

Hope this helps,
Erik
 
The entire layout of a page doesn't HAVE to be built out of tables tags, but it's still the most reliable and cross-browser compatible method. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
I dont know that i would reccomend table layouts as a good way to be learning to layout your pages. Historically they were the only way to layout a html page but now using stylesheets and dhtml we can position elements much more reliably and simply without using complex and often convoluted table layouts.

If i was you, i'd be more interested in some online tutorials in using dhtml, and css (cascading stylesheets) to achieve your page layout.

Tables may be the most reliable method of positioning but they are certainly the most complex, time-consuming, non-standards compliant, difficult to update and generally most annoying. They do have there uses in page layout but are certainly far from the be all...

Anyway i guess your getting my feelings on using tables for anything other than a table here!! Try using 'css positioning' instead - its quick easy and works reliably for the vast majority of users.

check out these links for good tutorials on web development,

(particularly the 'authoring' and 'stylesheets' sections)



and above all - have fun

rob
 
Try using DHTML for formatting your pages and then see what they look like in NS4.7. I'm playing devil's advocate here, I absolutely HATE having to program for NS4.7. However, aren't there also cross-browser compatibility problems with divs, iframes, etc? Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top