Solved

table alignment

Posted on 2000-03-16
7
218 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

930 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now