Solved

table alignment

Posted on 2000-03-16
7
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

635 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