The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern


  • # 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;

    # January 9, 2013 at 11:20 am

    This reply has been reported for inappropriate content.


    What are you expecting it to do? What is it doing instead? Do you have a demo? Live link? Correct me if I’m wrong, but I think your question is kinda broad when you want to know “why isn’t it working”

    # 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:

    # January 9, 2013 at 12:52 pm

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

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

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed