CSS parent:hover child?

Discussion in 'HTML' started by Mazin07, Nov 29, 2005.

  1. Mazin07

    Mazin07 Guest

    In CSS, how do I make a child object's style change when the parent is
    hovered?

    IE,

    <ul>
    <li>Something
    <ul>
    <li>else</li>
    <li>else</li>
    </ul>
    </li>
    <li>Something
    <ul>
    <li>else</li>
    <li>else</li>
    </ul>
    </li>
    </ul>


    Make the "else"s turn red when "Something" is hovered.
    Mazin07, Nov 29, 2005
    #1
    1. Advertising

  2. Mazin07 wrote:
    > In CSS, how do I make a child object's style change when the parent is
    > hovered?


    li.something:hover li {
    color: red;
    background: white;
    }
    Leif K-Brooks, Nov 29, 2005
    #2
    1. Advertising

  3. Mazin07

    Toby Inkster Guest

    Mazin07 wrote:

    > In CSS, how do I make a child object's style change when the parent is
    > hovered?


    PARENT:hover CHILD {
    property: value;
    }

    However, the inverse cannot be done. :-(

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Nov 30, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. davout
    Replies:
    0
    Views:
    542
    davout
    Apr 18, 2004
  2. Jeff Rodriguez
    Replies:
    23
    Views:
    1,092
    David Schwartz
    Dec 9, 2003
  3. Replies:
    0
    Views:
    201
  4. Noel Dolan
    Replies:
    0
    Views:
    217
    Noel Dolan
    Jul 18, 2004
  5. Bitswapper
    Replies:
    5
    Views:
    119
    Prasad, Ramit
    Aug 27, 2013
Loading...

Share This Page