Solved

table alignment

Posted on 2000-03-16
7
216 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Fire Fox doesn't show calendar on html page ? 5 47
Menu Inconsistent 3 21
SVG Star 4 16
addressing a specific html page 9 27
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
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.
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…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

757 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

20 Experts available now in Live!

Get 1:1 Help Now