Solved

table alignment

Posted on 2000-03-16
7
222 Views
Last Modified: 2012-05-04
I have a problem over here. Can you please correct my mistake.I want my website to appear into 2 part. The menu(#ffffC0) part is on my left and main(#004000) will be on my right.My problem is that menu(left) and main(right) are not side by side. Instead menu appear in the top and main appear below.How can i adjust it so that it appear at the side of each other?

And the another problem the texts in main(#004000) doesnt look like center.I want the text to be in the center within main(#004000).

<body background="bgcolor.gif" vlink="orange" alink="Lime"  />

<hr />

<table border="2" cellpadding="8" cellspacing="0"><left>
<tr><font size="4" face="impact">
<tr><td><a href="main.html">Main</a></tr>
<tr><td><a href="Info.html">Horoscope</a></tr>
<tr><td><a href="comment.html">Comment</a></tr>
<tr><td><a href="link.html"><Links</a></tr>
</font>




<div align="center">
<table border="0" width="400" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<font size="2" color="white" face="comic sans ms">
<var>
Norton Internet Security.<br />
The program is your personal firewall againt possible attacks and even helps block out sensitive website from your children prying eyes.<br />
It also prevent "malicious" Activex and Java applets from runnin on your computer without knowledge,blocks confidential information from being entered into non secured website and can also block cookies.<br >
</td></tr></table></div>
    </td></tr></table>


Please Help.
0
Comment
Question by:chwankok
7 Comments
 
LVL 8

Expert Comment

by:xabi
ID: 2623707
The problem with the menu and main can be solved this way:

<table border="0" cellspacing="0" cellpadding="0">
<tr><td>

here put the menu table

</td></tr>
<tr><td>

here put the main table

</td></tr>
</table>

xabi
0
 
LVL 8

Expert Comment

by:xabi
ID: 2623716
Here is the correct one, sorry:

<table border="0" cellspacing="0" cellpadding="0">
<tr><td>

here put the menu table

</td><td>

here put the main table

</td></tr>
</table>
0
 
LVL 8

Expert Comment

by:xabi
ID: 2623733
And here goes your code modified:

-------- 8< ----------- 8< --------
<body background="bgcolor.gif" vlink="orange" alink="Lime"/>
<hr/>
<table cellspacing="0" cellpadding="0">
 <tr><td>
  <table border="2" cellpadding="8" cellspacing="0">
   <tr><td><a href="main.html">Main</a></td></tr>
   <tr><td><a href="Info.html">Horoscope</a></td></tr>
   <tr><td><a href="comment.html">Comment</a></td></tr>
   <tr><td><a href="link.html">Links</a></td></tr>
  </table>
 </td>
 <td>
  <table border="0" width="400" cellspacing="0" cellpadding="0">
   <tr><td align="center">
    <font size="2" color="white" face="comic sans ms">
     Norton Internet Security.<br />
     The program is your personal firewall againt possible attacks and even helps block out sensitive website from your children prying eyes.<br />
     It also prevent "malicious" Activex and Java applets from runnin on your computer without knowledge,blocks confidential information from being entered into non secured website and can also block cookies.<br >
    </font>
   </td></tr>
  </table>
 </td></tr>
</table>
</body>
-------- 8< --------- 8< ---------

xabi
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 8

Expert Comment

by:xabi
ID: 2623753
Notes:

Your tables was malformed. You alway must close all the <tr><td> tags. (take a look at your menu table. It must be something like:

<table>
 <tr>
  <td>
   ...
  </td>
 </tr>
 <tr>
  <td>
   ...
  </td>
 </tr>
</table>

You don't close the <td> tags, and you have <tr> without closing them ...

xabi
0
 
LVL 1

Expert Comment

by:red117
ID: 2624400
i know this isnt exactly what you want but, why not just put this in frames?  the only people that wont be able to see the page framed are people running like IE2 and if they are running old stuff like that then maybe they shouldnt be looking anyway...

i think frames look much nicer than a table when it comes to page layout, and allow you to do much more, and save much programming,  or cutting and pasting.

 
0
 
LVL 7

Expert Comment

by:nettrom
ID: 2627645
the usage of / to close elements without a closing tag tells me you're trying to use XHTML, so why not go the whole distance and use CSS to float the left table?  should be easier to get the document to validate then (although I haven't tried to validate against XHTML transitional, so I can't say for sure).

<div style="float:left; width:200px;">
<!-- left table goes in here -->
</div>

<div align="center">
<!-- the other table goes in here -->
</div>

adjust the width of the first DIV as necessary, use percentage values if you like.
0
 
LVL 1

Accepted Solution

by:
ruifranco earned 50 total points
ID: 2627906
Easy enough:

For the alignment just put the "ALIGN=left" on the TABLE tag

But, as a far better solution. why not closing all tags (TD and TABLE)?
IE is much more practical then Netscape and renders everything properly but Netscape goes mad when you dont' close all tags.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HTML5 frame 5 31
How to create a textarea which saves text in HTML 8 47
Create an automated page index 9 53
Can't get second accordion on page to work 2 13
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question