Solved

This is a sinch - tables.

Posted on 1998-12-13
15
138 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
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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 discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

770 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