Doh, I just realised there was a typo in my last message. The CSS selector should have read
div.article div.article-image img { display: none; /* or however you want to do the hiding */ } div.article:first-child div.article-image img { display: inline; /* or however you want to do the showing */ } note the : after article in the second selector Sam On 10/5/05, Sam Partington <[EMAIL PROTECTED]> wrote: > This should do the trick : > > div.article div.article-image img > { > display: none; /* or however you want to do the hiding */ > } > > div.article-first-child div.article-image img > { > display: inline; /* or however you want to do the showing */ > } > > But guess what? :first-child is not not supported in IE. I'd usually > fix this by using a class called article_first_child, and adding that > to the class list using server scripting : > > <div class="article_first_child"> > <div class="article-image"><img src="..."></div> > </div> > <div class="article"> > <div class="article-image"><img src="..."></div> > </div> > > HTH > > Sam > > > On 10/4/05, Marcelo Wolfgang <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I have a page with mutiple <div class="article"> attributes. inside > > each one of them I have another <div> with a image on it so it's > > something like this > > > > <div class="article"> > > <div class="article-image"><img src="..."></div> > > </div> > > <div class="article"> > > <div class="article-image"><img src="..."></div> > > </div> > > <div class="article"> > > <div class="article-image"><img src="..."></div> > > </div> > > > > *Note, this is not the complete markup, is just a simple testcase ... > > > > Is it possible to write a css that AUTOMATICALLY only shows the image > > on the first div ? > > Does not need to work on IE, only Firefox, but if it works on ie, better > > yet. > > > > TIA > > Grillo > > ______________________________________________________________________ > > css-discuss [EMAIL PROTECTED] > > http://www.css-discuss.org/mailman/listinfo/css-d > > List wiki/FAQ -- http://css-discuss.incutio.com/ > > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ > > > ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/