• Hover on parent to change child

    From Andrew Poulos@21:1/5 to All on Sun Aug 23 08:52:00 2020
    Is it possible to have :hover on a parent DIV which only changes the
    background colour of one of its child DIVs?

    <div class="parent">
    <div class="child-1"></div>
    <div class="child-2"></div>
    <div class="child-3"></div>
    <div class="child-4"></div>
    </div>

    .child-1 {
    background-color: #666666;
    }

    .parent:hover {
    /* css, but only for child-1 */
    background-color: #FFFFFF;
    }


    Andrew Poulos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?8J+YiSBHb29kIEd1eSDwn5iJ?@21:1/5 to Andrew Poulos on Sun Aug 23 00:12:13 2020
    This is a multi-part message in MIME format.
    On 22/08/2020 23:52, Andrew Poulos wrote:
    Is it possible to have :hover on a parent DIV which only changes the background colour of one of its child DIVs?


    something like this:

    |.parent:hover>.child-1 { background-color: #FFFFFF; }
    |

    |
    |

    |
    |

    --

    With over 1.2 billion devices now running Windows 10, customer
    satisfaction is higher than any previous version of windows.


    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body text="#008000" bgcolor="#faf0e6">
    <div class="moz-cite-prefix">On 22/08/2020 23:52, Andrew Poulos
    wrote:<br>
    </div>
    <blockquote type="cite"
    cite="mid:iNKdne4OkcAOPNzCnZ2dnUU7-dvNnZ2d@westnet.com.au">Is it
    possible to have :hover on a parent DIV which only changes the
    background colour of one of its child DIVs? <br>
    <br>
    <br>
    </blockquote>
    <p>something like this:</p>
    <p><code> .parent:hover&gt;.child-1 { background-color: #FFFFFF; } <br>
    </code></p>
    <p><code><br>
    </code></p>
    <p><code><br>
    </code></p>
    <div class="moz-signature">-- <br>
    <div style="background-color: blue; color: yellow; font-weight:
    bolder; display: grid; align-items: center; justify-items:
    center; min-height: 80px; font-size: 1.2em; border-radius: 50px;
    ">
    <p>With over 1.2 billion devices now running Windows 10,
    customer satisfaction is higher than any previous version of
    windows.</p>
    </div>
    </div>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew Poulos@21:1/5 to All on Sun Aug 23 13:39:11 2020
    On 23/08/2020 9:12 am, 😉 Good Guy 😉 wrote:
    On 22/08/2020 23:52, Andrew Poulos wrote:
    Is it possible to have :hover on a parent DIV which only changes the
    background colour of one of its child DIVs?


    something like this:

    |.parent:hover>.child-1 { background-color: #FFFFFF; }

    Too my surprise, it works. Thanks.

    Andrew Poulos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Evertjan.@21:1/5 to Andrew Poulos on Sun Aug 23 12:24:43 2020
    Andrew Poulos <ap_prog@hotmail.com> wrote on 23 Aug 2020 in comp.infosystems.www.authoring.stylesheets:

    On 23/08/2020 9:12 am, Y~% Good Guy Y~% wrote:
    On 22/08/2020 23:52, Andrew Poulos wrote:
    Is it possible to have :hover on a parent DIV which only changes the
    background colour of one of its child DIVs?


    something like this:

    |.parent:hover>.child-1 { background-color: #FFFFFF; }

    Too my surprise, it works. Thanks.

    Even so, gender-identity is not a choice and does not depend on the child's semantic background, parents should not hover over their children trying to change this.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew Poulos@21:1/5 to Evertjan. on Mon Aug 24 08:52:53 2020
    On 23/08/2020 8:24 pm, Evertjan. wrote:
    Andrew Poulos <ap_prog@hotmail.com> wrote on 23 Aug 2020 in comp.infosystems.www.authoring.stylesheets:

    On 23/08/2020 9:12 am, ÐY~% Good Guy ÐY~% wrote:
    On 22/08/2020 23:52, Andrew Poulos wrote:
    Is it possible to have :hover on a parent DIV which only changes the
    background colour of one of its child DIVs?


    something like this:

    |.parent:hover>.child-1 { background-color: #FFFFFF; }

    Too my surprise, it works. Thanks.

    Even so, gender-identity is not a choice and does not depend on the child's semantic background, parents should not hover over their children trying to change this.

    Yes, you're right that parents should take no responsibility for their children's well being.

    Andrew Poulos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Evertjan.@21:1/5 to Andrew Poulos on Mon Aug 24 01:18:12 2020
    Andrew Poulos <ap_prog@hotmail.com> wrote on 24 Aug 2020 in comp.infosystems.www.authoring.stylesheets:

    |.parent:hover>.child-1 { background-color: #FFFFFF; }

    Too my surprise, it works. Thanks.

    Even so, gender-identity is not a choice and does not depend on the
    child's semantic background, parents should not hover over their
    children trying to change this.

    Yes, you're right that parents should take no responsibility for their children's well being.

    Eh? Seems you didn't read the specs.



    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)