I have a really big table that contains input fields in most cells. The 
client wants some of these input fields to be a certain width, and 
others to be larger. I can accomplish this in Firefox and other browsers 
who understand child selectors easily like this:

#costsheet input {
    width: 3em;
    }
#costsheet td + td + td + td + td + td + td input {
    width: 6em;
    }

However, I can't figure out a way to assign widths to input elements in 
specific columns in IE. I have set up col elements within the table and 
assigned them all ids. This allows me to style the table cells within 
that column in IE. However, I can't style any child elements of the 
table cells, just the cells themselves. This doesn't work:

#col-default input {
    width: 6em;
}

This is not surprising, since the input elements are not actually 
descendants of the columns, and even IE appears to get this right. (By 
the way, adding the td element into the selector doesn't help.) I'm 
guessing there is no way to use descendant selectors to target input 
elements in specific columns in IE.

So does anyone have any other ideas, short of putting a class on every 
single input element that needs another width (that would be awful!)?

Zoe

-- 
Zoe M. Gillenwater
Design Services Manager
UNC Highway Safety Research Center
http://www.hsrc.unc.edu


______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to