Valhalla Legends Forums Archive | Web Development | CSS Table ColSpan??

AuthorMessageTime
Grok
peofeoknight, or whomever can answer ...

I do not see an equivalent to the TD or TD attribute "COLSPAN" in CSS. How do I get a cell to span multiple columns with a style rule?
March 10, 2004, 2:00 PM
j0k3r
I was looking through some pages, and couldn't find the attributes for TD, it would appear that the element does not exist yet...

http://k_c.home.mindspring.com/style.html
Here he shows some properties of the TD tag, but when you look through the source code he still has colspan="2" WITH the class name.

http://aamcf.co.uk/html/attr
Also, if this is a complete list, the element doesn't exist.

[note]I'm not real big on all the terms yet, so if my post doens't make sense just ask me to clarify it[/note]
March 10, 2004, 3:09 PM
Grok
TD is a structural element for HTML and it DOES exist. It is a normal table cell.

What I'm needing is an equivalent CSS style rule to the "colspan" attribute OF the TD element. The goal is to remove deprecated markup in favor of CSS.

Note that I have both an HTML reference and CSS reference. I don't need a list of attributes. I just need the style equivalent of colspan.
March 10, 2004, 4:35 PM
Telos
I have looked for this before and it is the case that there is no current CSSv2 equivalent for colspan. CSSv3 (not implemented in IE yet AFAIK) supports the column-span CSS attribute of TD but other than that I think youre stuck with using an HTML attribute.
March 10, 2004, 7:08 PM
Grok
Hmm ok thanks. Guess I'll just not use a table rather than breaking page validity.
March 10, 2004, 7:11 PM
Adron
Colspan and rowspan seem like they should stay html. Those are typically used for headers and dependent on the number of columns in the table - adding a column is something you do in the html code, and so changing the colspan to the new correct value should be done there too. It doesn't make sense that the operation "insert a column" would require changes both in the css and the html.
March 10, 2004, 8:21 PM
j0k3r
Grok, maybe you misunderstood my post, I was talking about CSS not having the TD equivelent, yet. It does seem as though it should be a part of CSS though.
March 10, 2004, 9:42 PM
Grok
[quote author=j0k3r link=board=22;threadid=5711;start=0#msg48791 date=1078954974]
Grok, maybe you misunderstood my post, I was talking about CSS not having the TD equivelent, yet. It does seem as though it should be a part of CSS though.
[/quote]

Actually I think Adron's explanation makes more sense. colspan is a structural markup, while background-color is decoration markup. The former is XML and the latter CSS.

I could just run a table with colspan through the XHTML validator to see if it complains.
March 10, 2004, 9:47 PM
peofeoknight
I wouldn't know actually. I have not been useing tables lately, but rather all divs. I have not had a whole lot of tabular data though. Just using the asp.net repeater control to populate divs that I set the properties to by using a class.
March 11, 2004, 2:52 AM
peofeoknight
[quote author=Telos link=board=22;threadid=5711;start=0#msg48746 date=1078945702]
I have looked for this before and it is the case that there is no current CSSv2 equivalent for colspan. CSSv3 (not implemented in IE yet AFAIK) supports the column-span CSS attribute of TD but other than that I think youre stuck with using an HTML attribute.
[/quote]3 is not implimented by anyone yet. Its still on the table. IE is always slow to impliment stuff, I mean they do not even fully support regular css, take the min-height attribute for example, or important. I bet 3 will not be ie ready for about 10 yrs :P
March 11, 2004, 2:54 AM
Grok
[quote author=peofeoknight link=board=22;threadid=5711;start=0#msg48862 date=1078973656]
[quote author=Telos link=board=22;threadid=5711;start=0#msg48746 date=1078945702]
I have looked for this before and it is the case that there is no current CSSv2 equivalent for colspan. CSSv3 (not implemented in IE yet AFAIK) supports the column-span CSS attribute of TD but other than that I think youre stuck with using an HTML attribute.
[/quote]3 is not implimented by anyone yet. Its still on the table. IE is always slow to impliment stuff, I mean they do not even fully support regular css, take the min-height attribute for example, or important. I bet 3 will not be ie ready for about 10 yrs :P
[/quote]

Odd. This from w3.org:
[quote]2001-12-19 Microsoft released Internet Explorer for the Mac 5.1, with bug fixes and improved performance. Supports full CSS1 and partial CSS2. (Mac IE 5 was the first browser to reach better than 99% support for CSS1, in March 2000.)[/quote]

I wouldn't say that is quite "always slow to implement stuff".
March 11, 2004, 5:25 AM
Adron
[quote author=Grok link=board=22;threadid=5711;start=0#msg48890 date=1078982733]
Odd. This from w3.org:
[quote]2001-12-19 Microsoft released Internet Explorer for the Mac 5.1, with bug fixes and improved performance. Supports full CSS1 and partial CSS2. (Mac IE 5 was the first browser to reach better than 99% support for CSS1, in March 2000.)[/quote]

I wouldn't say that is quite "always slow to implement stuff".
[/quote]

Why do you mention the Mac version of IE? Is that the version they implement stuff fastest in? Are they so obviously expending their effort only in areas where there is competition, and letting the Windows IE go slower since they have that market completely in their grasp already?
March 11, 2004, 11:24 PM
Grok
LOL how would I know what they're thinking? I was just saying peofeoknight's statement flies in the face of w3's statement. You'll have to ask Microsoft why :)
March 11, 2004, 11:40 PM
peofeoknight
[quote author=Grok link=board=22;threadid=5711;start=0#msg48890 date=1078982733]
[quote author=peofeoknight link=board=22;threadid=5711;start=0#msg48862 date=1078973656]
[quote author=Telos link=board=22;threadid=5711;start=0#msg48746 date=1078945702]
I have looked for this before and it is the case that there is no current CSSv2 equivalent for colspan. CSSv3 (not implemented in IE yet AFAIK) supports the column-span CSS attribute of TD but other than that I think youre stuck with using an HTML attribute.
[/quote]3 is not implimented by anyone yet. Its still on the table. IE is always slow to impliment stuff, I mean they do not even fully support regular css, take the min-height attribute for example, or important. I bet 3 will not be ie ready for about 10 yrs :P
[/quote]

Odd. This from w3.org:
[quote]2001-12-19 Microsoft released Internet Explorer for the Mac 5.1, with bug fixes and improved performance. Supports full CSS1 and partial CSS2. (Mac IE 5 was the first browser to reach better than 99% support for CSS1, in March 2000.)[/quote]

I wouldn't say that is quite "always slow to implement stuff".
[/quote]Lol. IE is historically slow to impliment stuff. I know this from experience. I mean come on they do not support min height, they do not support, important, the do not support the hover attribute except on links, they do not support fixed except on backgrounds, the are not implimenting the w3 standards and still have an unpolular box model on their loose doc types. The ie5 box model was not neccessarily evil, but it was not compliant with w3 and popular browsers at all. They are just now getting their act together witht hat on ie6, but you will only see it on a strict doc type. IE does not fully support CSS1. I do not know about mac versions, but I am talking about the windows versions. I have ie 4, 5, 5.5, and 6 running on this machine right now, I can tell yuo 5 and 5.5 do not impliment css correctly and I can tell you the 6 doesn't get it quite right either even when I use an xhtml 1.0 strict doc type.
March 14, 2004, 6:09 PM
peofeoknight
This is bumping a dead thread, but there is no need for a css colspan, but It would not suprise me if it worked its way into css sometime down the line.
http://knights.europe.webmatrixhosting.net/hybrid.html
http://knights.europe.webmatrixhosting.net/hybrid2.html
rowspan and colspan are perfectly valid xhtml... but this is just one more attribute that is not in your style sheet if you have a hybrid layout, I can see how it would be a minor annoyance not having that in the style sheet, but when you think about it colspan and rowspan are structural, they dictate that that cell will take the place of where another could fit, rather then just where cells are so your style and structure are still separate. Thats just my thoughts. I am not a fan of table based layouts, but I guess it must seem as I am just anti table. I am not infact that much of a zealot for no tables, its just the way tables get used by the majority of people who use them, if the person who is using the tables styles them with css and it is valid code, and there is no nesting of the tables going on it is just fine. The reason I would prefer a div based layout though is that I can keep my content in a specific order so that I am only includeing 1 external file, and so that I can have my navigation above or below content, but divided for it for text based and audio braille browsers. Using divs can make my code just more organised even though it means more to worrie about visa vi browser support.
April 26, 2004, 1:20 AM

Search