Wild first descendant of element

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KeredDrahcir
    Contributor
    • Nov 2009
    • 426

    #1

    Wild first descendant of element

    I have a division and I need to target the first element inside it but it won't always be to same. In some cases it will be a paragraph, sometimes an unordered list and sometmes an ordered list.
    It is only the first one I want to target. Is there a way to do this. Something like:
    Code:
    .mydiv + *{
      [I]mystyle[/I]
    }
    That does work but if I put a floated div inside it doesn't like it. It's quite happy with the normal div.
Working...