Forums

  • # January 9, 2013 at 11:16 am

    Can someone tell me why this isn’t working… Thank you!

    input:focus .project-info li {
    border-left:4px solid #cc3300;
    background:#e8e8e8;
    }

    # January 9, 2013 at 11:26 am

    My apologies, I think I figured out my own problem while putting it together in codepen.

    Essentially, I wanted a way, when a user :focus on an input, for the li outside of it to change its color, but that isn’t possible, since it’s on the outside.

    Sounds like this is a job for jQuery.

    # January 9, 2013 at 12:42 pm

    Yep, you can’t link to other elements that aren’t related. What you could potentially do is use the sibling or adjacent selectors if the elements are one after the other.

    # January 9, 2013 at 12:44 pm

    For example: http://codepen.io/andyunleashed/pen/sABix

    # January 9, 2013 at 12:52 pm

    Just created a JQuery solution for if the UL is outside of the realm of using CSS.

    http://codepen.io/andyunleashed/pen/hBKHi

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag