Correction: it has to be a child selector, not a descendant selector
.viewer > h1:first-child
without ">" it works out to be a first child of ANY element inside
"viewer".
You can also define many levels of "first child of fist child ...", in
case the first header is wrapped in some other element but you want
the rule to apply to it nevertheless:
.viewer > *:first-child > h1:first-child
-- R
>
> > > h1 is styled to have 1.2em top margin. I like it, but not when h1 is
> > > the first thing in a tiddler
>
> > Well, in theory you could use the ":first-child" selector:
> > .viewer h1 {
> > color: green;
> > }
>
> > .viewer h1:first-child{
> > color: red;
> > }
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---