Solved

table alignment

Posted on 2000-03-16
7
219 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

777 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