Re: [WSG] how to set table column widths with CSS

2008-01-18 Thread Keryx Web

Philippe Wittenbergh skrev:


I'm styling the  element, not a descendant or child of col (there 
are none, anyway).

(col:first-child applies to the first column, child of colgroup)

width applies perfectly to the  element.



I was surprised to see that until this post no one had referred to using 
width on col, as it is one of the four allowed properties.


Maybe this subject is tricky as MSIE support too many properties!

I keep coming back to this in discussions everywhere:
http://ln.hixie.ch/?count=1&start=1070385285


Lars Gunther


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] how to set table column widths with CSS

2008-01-11 Thread Philippe Wittenbergh


On Jan 11, 2008, at 11:51 PM, Alastair Campbell wrote:


On Jan 11, 2008 7:29 AM, Philippe Wittenbergh <[EMAIL PROTECTED]> wrote:

col:first-child {width:10em;}
col:first-child+col {width: 5em;}


From memory, I don't think col has children as such, it's quite a  
headache:

https://bugzilla.mozilla.org/show_bug.cgi?id=915


I'm styling the  element, not a descendant or child of col  
(there are none, anyway).

(col:first-child applies to the first column, child of colgroup)

width applies perfectly to the  element.



To anyone who mentioned that IE (6) doesn't support these selectors,  
I **know**.
And that was also the point of my post. The OP wanted a solution  
without the use of classes (or a minimal use of them).


She could attach  class to each  element, eventually.

Philippe
---
Philippe Wittenbergh






***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] how to set table column widths with CSS

2008-01-11 Thread Robert O'Rourke

Katrina wrote:

Gday,

Can someone please remind me how to set the width on a simple table 
column without suffering classitis?


Doctype: HTML4.01 strict. Must validate.

Thanks!
Kat



Hi Kat,

  I tend to mark up my tables using something like this:


   
   
   Column 1
   Column 2
  
   
   
  
 value 1
 value 2
  
   


It is attribute heavy but you can use the following CSS:

#c1 { width: 70%; } // column header width sets whole column width
#c2 { width: 30%; }

Works quite well for me cross-browser. Plus it's probably semantic 
(whatever that really means...)


-Rob


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] how to set table column widths with CSS

2008-01-11 Thread Max A. Shpack
It won't work in IE6 and below, it doesn't supports such selectors
unfortunately.

Max.

2008/1/11, Alastair Campbell <[EMAIL PROTECTED]>:
> On Jan 11, 2008 7:29 AM, Philippe Wittenbergh <[EMAIL PROTECTED]> wrote:
> > col:first-child {width:10em;}
> > col:first-child+col {width: 5em;}
>
> From memory, I don't think col has children as such, it's quite a headache:
> https://bugzilla.mozilla.org/show_bug.cgi?id=915
>
> However, a combination of col HTML attributes and the td:first-child
> ones should work across IE and Firefox (and I assume Safari & Opera).
>
> Cheers,
>
> -Alastair
>
>
> ***
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: [EMAIL PROTECTED]
> ***
>
>


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] how to set table column widths with CSS

2008-01-11 Thread Alastair Campbell
On Jan 11, 2008 7:29 AM, Philippe Wittenbergh <[EMAIL PROTECTED]> wrote:
> col:first-child {width:10em;}
> col:first-child+col {width: 5em;}

>From memory, I don't think col has children as such, it's quite a headache:
https://bugzilla.mozilla.org/show_bug.cgi?id=915

However, a combination of col HTML attributes and the td:first-child
ones should work across IE and Firefox (and I assume Safari & Opera).

Cheers,

-Alastair


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] how to set table column widths with CSS

2008-01-11 Thread Rochester oliveira
but IE doesn't render this pseudo-class


2008/1/11, Philippe Wittenbergh <[EMAIL PROTECTED]>:
>
>
> On Jan 11, 2008, at 2:59 PM, Katrina wrote:
>
> > Gday,
> >
> > Can someone please remind me how to set the width on a simple table
> > column without suffering classitis?
> >
> > Doctype: HTML4.01 strict. Must validate.
>
> What is wrong with classes ?
>
> else:
> col:first-child {width:10em;}
> col:first-child+col {width: 5em;}
> ...
>
> or
> td:first-child {width:10em;}
> td:first-child+td {width: 5em;}
> ...
>
> But: congratulations! your stylesheet just took a beating as far as
> performance goes.
>
> Philippe
> ---
> Philippe Wittenbergh
> 
>
>
>
>
>
> ***
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: [EMAIL PROTECTED]
> ***
>
>


-- 
[]'s

-
Rochester Oliveira
http://webbemfeita.com/
"Viva a Web-Bem-Feita"
Web Designer
Curitiba - PR - Brasil


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] how to set table column widths with CSS

2008-01-10 Thread Philippe Wittenbergh


On Jan 11, 2008, at 2:59 PM, Katrina wrote:


Gday,

Can someone please remind me how to set the width on a simple table  
column without suffering classitis?


Doctype: HTML4.01 strict. Must validate.


What is wrong with classes ?

else:
col:first-child {width:10em;}
col:first-child+col {width: 5em;}
...

or
td:first-child {width:10em;}
td:first-child+td {width: 5em;}
...

But: congratulations! your stylesheet just took a beating as far as  
performance goes.


Philippe
---
Philippe Wittenbergh






***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] how to set table column widths with CSS

2008-01-10 Thread Alexey Ten
   - using style attribute on appropriate cell or
   - using col element with width attribute, though it's not CSS.


On Jan 11, 2008 8:59 AM, Katrina <[EMAIL PROTECTED]> wrote:

> Gday,
>
> Can someone please remind me how to set the width on a simple table
> column without suffering classitis?
>
> Doctype: HTML4.01 strict. Must validate.
>
> Thanks!
> Kat
>
>


-- 
Алексей

***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***