SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,098
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Just getting into css3, can someone explain this?

    I am seeing this quite a bit,
    Code:
    .main > li {}
    and
    .menu-main > li > .dropdown {}
    What is the purpose of the >

    What I did in the past was just,
    Code:
    .main  li {}
    and
    .menu-main  li  .dropdown {}
    They both seen to work the same so it's just a little confusion on my part.
    Thanks
    What I lack in acuracy I make up for in misteaks

  2. #2
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    That is a child selector which has been introduced in CSS2 (not CSS3).

    The difference between the two is that in your first examples li matches all immediate children of .main whereas in the second example li matches all descendant selectors of .main, they don't have to be immediate children.
    Maleika E. A. | Rockatee | Twitter | Dribbble



  3. #3
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,098
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the answer. I was playing with it and came up with a great CSS menu. Very handy.
    What I lack in acuracy I make up for in misteaks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •