Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

This is a sinch - tables.

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
DannoNZ
Asked:
DannoNZ
  • 6
  • 4
  • 3
  • +2
1 Solution
 
Answers2000Commented:
<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
 
DannoNZAuthor Commented:
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
 
DannoNZAuthor Commented:
And, I don't see a single <th> in there - what is that for and where do I put it?
0
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
rafisternCommented:
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
 
rafisternCommented:
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
 
rupertsCommented:
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
 
DannoNZAuthor Commented:
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
 
rupertsCommented:
<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
 
DannoNZAuthor Commented:
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
 
rafisternCommented:
No you must put the formatting inside the cell.

0
 
RFordCommented:
<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
 
DannoNZAuthor Commented:
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
 
rupertsCommented:
I just can't wait to help you again!
0
 
rafisternCommented:
Here, have an answer.
0
 
DannoNZAuthor Commented:
Here, have 100 points and an 'A'.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 6
  • 4
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now