PDA

View Full Version : OT: Calling all HTML Guru's!!!



TheGeak
09-20-2005, 08:51 AM
I've got a small class project that i've put off to the last minute (yeah, i know...) and i'm having a few problems with setting up a page using tables. Anyone that can help, please, shoot me an IM at TheGeak on AOL.

Jay 535i
09-20-2005, 08:56 AM
I've got a small class project that i've put off to the last minute (yeah, i know...) and i'm having a few problems with setting up a page using tables. Anyone that can help, please, shoot me an IM at TheGeak on AOL.

I don't IM, but I can help you. We can discuss it here. You have to be quick, though, as I'm leaving on my honeymoon tomorrow and won't be checking the forum for a while after today.

BM-BOY
09-20-2005, 08:57 AM
http://www.htmlgoodies.com/

go there!!

uscharalph
09-20-2005, 09:04 AM
I don't IM, but I can help you. We can discuss it here. You have to be quick, though, as I'm leaving on my honeymoon tomorrow and won't be checking the forum for a while after today.
Congrats on the honeymoon!

Jay 535i
09-20-2005, 09:05 AM
Congrats on the honeymoon!

Cheers! :)

TheGeak
09-20-2005, 09:11 AM
Okey, basically....i'm supposed to be setting up a page with tables, using a colspan and rowspan attributes. I have a basic page set up....but now that i'm tryin' to add these too commands I can't figure it out.

Link to assignment: http://beta.webcourse.com/com201/

Is there a way to define how many columns and how many rows I want on the page or something like that?

Jay 535i
09-20-2005, 09:44 AM
Okey, basically....i'm supposed to be setting up a page with tables, using a colspan and rowspan attributes. I have a basic page set up....but now that i'm tryin' to add these too commands I can't figure it out.

Link to assignment: http://beta.webcourse.com/com201/

Is there a way to define how many columns and how many rows I want on the page or something like that?

With HTML tables, you don't define at the beginning how many rows or columns there will be. There are as as many rows as you have <TR> tags, and as many columns as there are <TD> tags in your longest row.

Still with me?

Let's say you want a very simple table with two rows, and you want the top row to have one cell and the bottom row to have two. In other words, the top row has a single cell that spans two columns. Your code will look like this:

<table border=1>
<tr><td colspan=2>TEXT</td></tr>
<tr><td>TEXT</td><td>TEXT</td></tr>
</table>

See how the top row has only one cell that spans two columns? Now I'm gonna take that same code, and add the ROWSPAN attribute, as your assignment instructs. The new code I'm adding is coloured:

<table border=1>
<tr><td rowspan="2">TEXT</td><td colspan=2>TEXT</td></tr>
<tr><td>TEXT</td><td>TEXT</td></tr>
</table>

Notice how the new code has nothing whatever to do with the second row? Since the new cell spans two rows (as per the rowspan attribute) it is already there in the second row, and my second-row coding begins immediately with the second cell in that row. This is probably the hardest part to grasp about ROWSPAN and COLSPAN.

Note, I've given my tables borders so you can clearly see the boundaries of each cell, and how your code affects them.

You can copy and paste my code above into any text editor and save the file with an HTM extension to see what it looks like.

I hope that helps. It's tough to explain. Let me know if you're still unclear.

TheGeak
09-20-2005, 09:48 AM
I think i've got it....I see what you mean about not defining it...you just go through and make as many rows/columns as you want, and from there tell the cells to span so many columns....this is neat...

Jay 535i
09-20-2005, 09:54 AM
I think i've got it....I see what you mean about not defining it...you just go through and make as many rows/columns as you want, and from there tell the cells to span so many columns....this is neat...

Exactly. The tricky part is remembering that, for example, if your top row's first cell spans two rows, then your second row's coding will begin with the SECOND cell. Similarly, if your top row has a cell that spans multiple columns, it will necessarily have fewer cells than the other rows.

TheGeak
09-20-2005, 10:23 AM
Have an email address I can email my "test page" to for you to check out for me?

TheGeak
09-20-2005, 10:40 AM
Well, wish me luck, i'm off to class to turn this monstrocity in. It works, thats the important part!!