CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 20th, 2002, 08:03 AM
CyberN8 CyberN8 is offline
UberGeek
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 67 CyberN8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 50 m 48 sec
Reputation Power: 8
Question CSS/IE6: Setting width of DIV inside first TD of table rows

I'm trying to use selectors and CSS inheritance to define the width of a DIV element (or the TD itself) of the very first TD in every table row. I have the following:

TABLE.list TR TD:first-child DIV
{
width:50%;
}

This does nothing (neither in IE6 nor NN6). Can anyone offer a solution?

Thanks,
N8.

Reply With Quote
  #2  
Old June 22nd, 2002, 09:41 AM
w3exit w3exit is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 21 w3exit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Try doing it inside Dreamweaver ... might be easier

Reply With Quote
  #3  
Old June 22nd, 2002, 04:55 PM
adios adios is offline
Senior Citizen
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2001
Location: leftcoast
Posts: 2,019 adios User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
I believe you'd need to use 'first-child' like this:

TABLE.list TR TD:first-child {....}

Irrelevent, anyway, except for NS6-intra as this pseudo-class isn't supported yet for MSIE. I think. Classes might do it:
Code:
<html> 
<head> 
<title>untitled</title> 
<style type="text/css"> 

body {
text-align: center;
}

table {
width: 80%;
border: 3px darkred double;
}

td {
height: 100px;
background: black;
}


td.first {
width: 50%;
height: 100px;
font: 200 18px monospace;
padding-left: 3px;
background: tomato;
}

</style> 
</head> 
<body> 
<table>
<tr>
<td class="first">class="first"</td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td class="first">class="first"</td><td></td><td></td><td></td><td></td><td></td>
</tr>
</table>
</body> 
</html>


http://www.blooberry.com/indexdot/c...sfirstchild.htm

Reply With Quote
  #4  
Old June 22nd, 2002, 07:56 PM
jkd jkd is offline
CF sMod
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Maine, USA (a.k.a. Boonies)
Posts: 242 jkd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 43 sec
Reputation Power: 9
Send a message via ICQ to jkd Send a message via AIM to jkd Send a message via Yahoo to jkd
If you're going to use the inefficient " " selected instead of the ">" selector, might as well go:

table.list td:first-child div

I'd personally go like:

table.list > tbody > tr > td:first-child > div

Because the > has better performance than " " (only searches one level down), though IE of course being the crappy browser that it is does not support >.
NS6, NS7, Galeon, K-meleon, Beonex, and anything Mozilla-based all do, as well as Opera 6 and probably the latest Konqueror. But naturally IE doesn't.
__________________
Jason Contact Me
Super moderator @ CodingForums

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS/IE6: Setting width of DIV inside first TD of table rows


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway