Den 5. mar. 2010 kl. 15.52 skrev Philippe Wittenbergh:

>> What I want to achieve is:
>> * multiple children of the same type should be displayed as a numbered list
>> * lone children of the above type should be displayed as inline text, 
>> *without* any numbering
>> 
>> Since i'm not able to combine the :before element with any variant of pseudo 
>> selectors that would differentiate between the two cases, I'm not able to 
>> remove the numbering from the single child case (or add it only to the 
>> multiple children case).
>> 
>> The present state can be seen at:
>> 
>> https://victorio.uit.no/langtech/trunk/words/dicts/nobfkv/src/adv_nobfkv.xml
> 
> E:only-of-type::before {content: none; content:''; } should work correctly.

Thanks a lot! That made it:)

> In Safari 4,Chrome 4, Opera 10.5, Gecko 1.9.2. Forget about IE, it doesn't 
> understand 'only-of-type'.

That's ok.

> I don't think working with counters() would produce different results.
> 
> testcase:
> http://dev.l-c-n.com/_temp/only-of-type-cssD220305.html

Thanks, I didn't find that one.

> note: neither WebKit nor Opera support 'content: none', hence the double 
> declaration.

Ok, that one put me off - didn't know about that.

The other thing i missed was the need to use double colons, like ::before - I 
tried only ':before'. What's the reason? When used directly with an element 
only a single colon (like :before) is needed.

> otherwise you could also do E:not(only-of-type)::before {content:'something'}

I tried variants of that as well, but again missed out on the double colon :: 
part.

> I don't have time to wade through your whole stylesheet / page. A simplified 
> test case please ?

I will try to simplify it next time.

Thanks a lot for your help!

Best regards,
Sjur N. Moshagen

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to