• Welcome to Valhalla Legends Archive.
 

CSS Table ColSpan??

Started by Grok, March 10, 2004, 08:00 AM

Previous topic - Next topic

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?

j0k3r

#1
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]
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

Grok

#2
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.

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.

Grok

Hmm ok thanks.  Guess I'll just not use a table rather than breaking page validity.

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.

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.
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

Grok

Quote from: j0k3r on March 10, 2004, 03:42 PM
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.

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.

quasi-modo

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.
WAR EAGLE!
Quote(00:04:08) zdv17: yeah i quit doing that stuff cause it jacked up the power bill too much
(00:04:19) nick is a turtle: Right now im not paying the power bill though
(00:04:33) nick is a turtle: if i had to pay the electric bill
(00:04:47) nick is a turtle: id hibernate when i go to class
(00:04:57) nick is a turtle: or at least when i go to sleep
(00:08:50) zdv17: hibernating in class is cool.. esp. when you leave a drool puddle

quasi-modo

Quote from: Telos on March 10, 2004, 01:08 PM
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.
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
WAR EAGLE!
Quote(00:04:08) zdv17: yeah i quit doing that stuff cause it jacked up the power bill too much
(00:04:19) nick is a turtle: Right now im not paying the power bill though
(00:04:33) nick is a turtle: if i had to pay the electric bill
(00:04:47) nick is a turtle: id hibernate when i go to class
(00:04:57) nick is a turtle: or at least when i go to sleep
(00:08:50) zdv17: hibernating in class is cool.. esp. when you leave a drool puddle

Grok

Quote from: peofeoknight on March 10, 2004, 08:54 PM
Quote from: Telos on March 10, 2004, 01:08 PM
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.
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

Odd.  This from w3.org:
Quote2001-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.)

I wouldn't say that is quite "always slow to implement stuff".

Adron

Quote from: Grok on March 10, 2004, 11:25 PM
Odd.  This from w3.org:
Quote2001-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.)

I wouldn't say that is quite "always slow to implement stuff".

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?

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 :)

quasi-modo

#13
Quote from: Grok on March 10, 2004, 11:25 PM
Quote from: peofeoknight on March 10, 2004, 08:54 PM
Quote from: Telos on March 10, 2004, 01:08 PM
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.
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

Odd.  This from w3.org:
Quote2001-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.)

I wouldn't say that is quite "always slow to implement stuff".
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.
WAR EAGLE!
Quote(00:04:08) zdv17: yeah i quit doing that stuff cause it jacked up the power bill too much
(00:04:19) nick is a turtle: Right now im not paying the power bill though
(00:04:33) nick is a turtle: if i had to pay the electric bill
(00:04:47) nick is a turtle: id hibernate when i go to class
(00:04:57) nick is a turtle: or at least when i go to sleep
(00:08:50) zdv17: hibernating in class is cool.. esp. when you leave a drool puddle

quasi-modo

#14
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.
WAR EAGLE!
Quote(00:04:08) zdv17: yeah i quit doing that stuff cause it jacked up the power bill too much
(00:04:19) nick is a turtle: Right now im not paying the power bill though
(00:04:33) nick is a turtle: if i had to pay the electric bill
(00:04:47) nick is a turtle: id hibernate when i go to class
(00:04:57) nick is a turtle: or at least when i go to sleep
(00:08:50) zdv17: hibernating in class is cool.. esp. when you leave a drool puddle