The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Colspan when a table contains another table
Illinois
post Feb 18 2011, 10:49 PM
Post #1





Group: Members
Posts: 6
Joined: 18-February 11
Member No.: 13,919



I have an html coding question regarding COLSPAN. It’s probably a simple question, but I think it’s an important one.

I have a webpage contained in a table. It has a row with one cell from left to right with a header image. This has a colspan 3.

Then I have a row with one cell containing five images from left to right (they’re website buttons). This cell has a colspan 3.

- - - my problem - - sometimes the page displays with a one-pixel white gap between those foregoing two rows - - -

1. Then I have a row TR and a cell TD containing an image that tiles vertically on the left side, and ends with a /TD.

2. Then I have a cell TD that contains a table with 2 columns (this is the main website content area) and ends with a /TD.

3. Then I have a cell TD containing an image that tiles vertically on the right side, ends with a /TD, and ends the row /TR.

To finish, I have a row with one cell containing a footer image from left to right. The cell has a colspan 3.

Is is possible that my colspans should be 4, instead of 3? I used three because I thought the inside table would appear as one cell to the larger table.

But maybe the larger table recognizes that there are technically four columns - - when you add up the left and right columns for vertical tiles, and the two columns contained inside the inside table?

Thank you for your advice. I have also tried my webpage with 4 columns, and it has not displayed incorrectly yet - - but when my colspan=3 displays incorrectly, it only happens occasionally, so I can’t be sure either way.

Or perhaps there is some other type of problem that I haven’t thought of.
Thank you very much for your help.

I guess I should also mention that when I have my left-side vertical cell for an image tile, then my table (with two columns) nested inside a cell, and then my right-side vertical cell for an image tile - - well, I have 4 rows within the right-most column of that nested table.

I have no rowspans corresponding to that. I wonder if that may be a problem.

Thank you for reading my post. Any advice would be appreciated.

This post has been edited by Illinois: Feb 18 2011, 11:29 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Feb 19 2011, 02:25 AM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Can you provide the URL (address) of a document that demonstrates the problem?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 19 2011, 03:07 AM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



QUOTE(Illinois @ Feb 19 2011, 04:49 AM) *

But maybe the larger table recognizes that there are technically four columns - - when you add up the left and right columns for vertical tiles, and the two columns contained inside the inside table?


No. That's not it. What Darin said...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Illinois
post Feb 19 2011, 02:20 PM
Post #4





Group: Members
Posts: 6
Joined: 18-February 11
Member No.: 13,919



Thank you, Darin and pandy.
Yes, I will post this online. I should have done that before.
I will be back as soon as I get the URL added by the hosting company.
Thank you!
Frank
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Illinois
post Feb 19 2011, 07:03 PM
Post #5





Group: Members
Posts: 6
Joined: 18-February 11
Member No.: 13,919



Here is the URL of the page (I have only one page posted).

http://www.perryfreeman.com/

The trouble I have is that every fourth or fifth time that I bring up the page - -

there is a one or two pixel white gap between the header and the row of buttons.

I have been over the coding several times; I even drew a map of the coding for myself - - and it seems okay!

Although I don’t know anything about the coding in the head - - I got that from another site, because it seems to keep the page up against the browser correctly - -

<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<style type="text/css"><!--body { margin: 0; padding: 0 }
--></style>
</HEAD>

Thank you very much for taking a look at my coding,
Frank
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Feb 19 2011, 09:38 PM
Post #6


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



I tried refreshing the page a number of times in all the browsers I have available (Firefox, Chrome, Safari, Opera, all on Mac), and didn't notice an extra gap once.

But your document lacks a doctype declaration, which puts browsers in quirks mode:
http://hsivonen.iki.fi/doctype/

And our online validator reports markup errors:
http://htmlhelp.com/cgi-bin/validate.cgi?u...mp;warnings=yes

Although I don't see any structural errors that would cause the problem you're describing.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 20 2011, 04:26 AM
Post #7


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Don't see a gap in IE6 either. What browser do you see it in?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Illinois
post Feb 20 2011, 12:25 PM
Post #8





Group: Members
Posts: 6
Joined: 18-February 11
Member No.: 13,919



Thank you for the replies.
I’m looking at this in IE8.
Frank
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 20 2011, 01:42 PM
Post #9


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Afraid none of us have IE8. You could add a doctype that takes browsers out of Quirks Mode and see if that helps though.

http://hsivonen.iki.fi/doctype/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Illinois
post Feb 20 2011, 02:05 PM
Post #10





Group: Members
Posts: 6
Joined: 18-February 11
Member No.: 13,919



Yes, I will try some of the other doctypes. I tried that in the past, but I was puzzled by the way that the validator errors and warnings would change.
I would have about three errors with <html> and then using a different doctype such as strict or transitional, I would receive several different errors.
Seemed pretty daunting, like learning a new language!
But yes, I will pursue the other doctypes further.
Many thanks, Pandy and Darin. The forum is a good resource - - this is the first time I used it - - I should have been using it all along.
Frank
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 20 2011, 02:32 PM
Post #11


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



That's because the different flavours of (X)HTML have different rules. In Transitional you can use the old presentational stuff, like FONT, align and so on. In Strict you can't. XHTML is all lower case, in HTML case doesn't matter.

Talking about old stuff, you shouldn't use old proprietary markup like LEFTMARGIN and TOPMARGIN. Apart from being old and non-standard, it's IE only. Today we use CSS.

Add this to your style sheet instead.
CODE

body   { margin: 0; padding: 0 }

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Illinois
post Feb 20 2011, 08:37 PM
Post #12





Group: Members
Posts: 6
Joined: 18-February 11
Member No.: 13,919



Thank you very much Pandy - - what good advice, what good information.
I think on my next project I will begin with a CSS stylesheet.
I read the post “Seeking sample of simple, correctly designed website,” and looked at links from Darin to, among others, Max Design - - http://www.maxdesign.com.au/articles/css-layouts/ and I should be able to make the switch to CSS.
This is a great forum, thank you very much.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 12:43 PM