Solved

This is a sinch - tables.

Posted on 1998-12-13
15
135 Views
Last Modified: 2010-04-09
I want code for a table with 3 columns and a growing variable number of rows.  I want the left and centre column left aligned and right column right aligned without de-aligning the horizontal line-up as I've seen some do.

I have had no experience at tables before, but I can do basic HTML editing.

50 points up for grabs here and I'll give you an extra 15 if you can make the first row heading three and every ninth or so row heading four.

Thank you.
0
Comment
Question by:DannoNZ
  • 6
  • 4
  • 3
  • +2
15 Comments
 
LVL 8

Expert Comment

by:Answers2000
Comment Utility
<TABLE>
<TR><TD ALIGN=LEFT>col 1<TD ALIGN=LEFT>col 2<TD ALIGN=RIGHT>col3
</TABLE>

Repeat the lines with <TR> as many times as necessary for more rows

I don't understand what the 15 is for (please explain what you want).  <TH> is a table heading, use COLSPAN=n (n is a number of columns) to spread the heading over multiple columns
0
 
LVL 2

Author Comment

by:DannoNZ
Comment Utility
Not enougth information.  Where do I put the <colspan=n> tag?  How do I make more rows?  This info may be plainly obvious to some of you - but I've never done a table before in my life.

For the bonus 15, I want the first row to be <h3> and rows determinable by me <h4>

Thank you.
0
 
LVL 2

Author Comment

by:DannoNZ
Comment Utility
And, I don't see a single <th> in there - what is that for and where do I put it?
0
 
LVL 4

Expert Comment

by:rafistern
Comment Utility
Is this what you want?

This is a table with:
- 1 row in first column
- 2 rows in second column
- 4 rows in third column

<table border=1>
<tr>
      <td rowspan=4>x</td>
      <td rowspan=2>x</td>
      <td>x</td>
</tr>
<tr>
      <td>x</td>
</tr>
      <td rowspan=2>x</td>
      <td>x</td>
</tr>
<tr>
      <td>x</td>
</tr>
</table>

0
 
LVL 4

Expert Comment

by:rafistern
Comment Utility
If my answer is the kind of thing you want then I'll explain a bit about tables to you for your 50 points.
0
 
LVL 4

Expert Comment

by:ruperts
Comment Utility
Have I got this right, if so I will generate your code!

----------------------------------------------
| Left AL   h3   | Left Al  h3  |Right Al   h3|
----------------------------------------------
| Left AL   P    | Left Al  P   |Right Al   P |
-----------------------------------------------
| Left AL   P    | Left Al  P   |Right Al   P |
-----------------------------------------------
| Left AL   P    | Left Al  P   |Right Al   P |
-----------------------------------------------
| Left h4   P    | Left h4  P   |Right h4   P |
-----------------------------------------------
| Left AL   P    | Left Al  P   |Right Al   P |
-----------------------------------------------
| Left AL   P    | Left Al  P   |Right Al   P |
-----------------------------------------------

Rupert!

0
 
LVL 2

Author Comment

by:DannoNZ
Comment Utility
Q's.

Does the <tr> tag go where you want the start of the row and </tr> at the end?

Does <td> start the particular co-ordinate and </td> end it?

Rupert, yes, that's what I want, I also want to be able to understand how to add more rows as I please.

DannoNZ
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 4

Expert Comment

by:ruperts
Comment Utility
<table>     (Start a table - ignore everything in ()!
<tr> (- Start a new Table Row)
<TD> (- Start a 1st Table Cell) </td> (Finish Cell)
<TD> (- Start a 2nd Table Cell) </td> (Finish Cell)
<TD> (- Start a 3rd Table Cell) </td> (Finish Cell)
</tr> - Finish First Row
</table> (Finish Table)
You can keep on adding rows buy adding more the same section again from <TR> to </tr>.

If you wanted four cells across just add another <td>yourtext</td> line.

To align text change <TD> to <td align="right"> you don't need to change </td>
Align="left" is the default.

Rupert
0
 
LVL 2

Author Comment

by:DannoNZ
Comment Utility
Can I go
<h3><tr><td>text</td><td>more text</td><td>third text</td></tr></h3>
for one row of my table?
0
 
LVL 4

Expert Comment

by:rafistern
Comment Utility
No you must put the formatting inside the cell.

0
 

Expert Comment

by:RFord
Comment Utility
<TABLE>
<TR>
<TH ALIGN=LEFT><H3>Heading 1</H3></TH>
<TH ALIGN=LEFT><H3>Heading 2</H3></TH>
<TH ALIGN=RIGHT><H3>Heading 3</H3></TH>
</TR>
<TD align=left>Information for column 1</TD>
<TD align=left>Information for columnl 2</TD>
<TD align=right>Information for columnl 3</TD>
</TR>
</TABLE>

I'm not sure how you plan to dynmically add more rows. If you'd like to use Tango (www.everyware.com) it is very easy. I'm also sure it is easy with javascript or asp.

But your method will determine the rest.  For good info on HTML go to www.htmlgoodies.com.

Rod

0
 
LVL 2

Author Comment

by:DannoNZ
Comment Utility
I don't like people who come along after all the information is there and form it into an answer.  Rastifern, post an answer.  I'll give you the points.
0
 
LVL 4

Expert Comment

by:ruperts
Comment Utility
I just can't wait to help you again!
0
 
LVL 4

Accepted Solution

by:
rafistern earned 100 total points
Comment Utility
Here, have an answer.
0
 
LVL 2

Author Comment

by:DannoNZ
Comment Utility
Here, have 100 points and an 'A'.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
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 Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

728 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

10 Experts available now in Live!

Get 1:1 Help Now