Solved

This is a sinch - tables.

Posted on 1998-12-13
15
151 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
[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
  • 6
  • 4
  • 3
  • +2
15 Comments
 
LVL 8

Expert Comment

by:Answers2000
ID: 1840576
<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
ID: 1840577
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
ID: 1840578
And, I don't see a single <th> in there - what is that for and where do I put it?
0
Industry Leaders: 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 4

Expert Comment

by:rafistern
ID: 1840579
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
ID: 1840581
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
ID: 1840582
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
ID: 1840583
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
 
LVL 4

Expert Comment

by:ruperts
ID: 1840584
<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
ID: 1840585
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
ID: 1840586
No you must put the formatting inside the cell.

0
 

Expert Comment

by:RFord
ID: 1840587
<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
ID: 1840588
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
ID: 1840589
I just can't wait to help you again!
0
 
LVL 4

Accepted Solution

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

Author Comment

by:DannoNZ
ID: 1840591
Here, have 100 points and an 'A'.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
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…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

707 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