So, I am working on navigation, which looks like:

```css
#head .nav {
    position: relative;
    z-index: 1;
}
#head .nav img {
    float: left;
    height: auto;
    padding: 40px;
    width: 200px;
}
#head .nav ul {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    padding-right: 20px;
    text-align: center;
    text-transform: uppercase;
    transition: all 0.5s ease;
}
#head .nav li {
    display: inline-block;
    padding: 70px 0 20px;
    position: relative;
}
#head .nav > ul > li > a {
    color: #fff;
    padding: 0 20px 10px;
}
#head .nav > ul > li > a:hover,
#head .nav > ul > li.current_page_ancestor > a {
    border-bottom: 1px solid rgba(255, 231, 208, 0.5);
}
#head .nav li a {
    text-decoration: none;
}
#head .nav li.current_page_item a {
    border-bottom: 1px solid rgba(255, 231, 208, 0.5);
    color: #ffe7d0;
}
#head .nav ul.children li {
    padding: 0;
}
#head .nav ul.children li a {
    background: rgba(255, 255, 255, 0.9);
    color: #191a22;
    display: block;
    margin-bottom: 1px;
    padding: 20px 20px 18px;
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100px;
}
#head .nav ul.children li a:hover {
    background: #fff;
}
#head .nav ul li ul {
    display: none;
    left: -50%;
    margin-top: 20px;
    padding: 0 0 0 10px;
    position: absolute;
    width: 100px;
}
#head .nav ul li:hover > ul,
#head .nav ul li ul:hover,
#head .nav ul li ul:focus {
    display: block;
}
```

```html
<div class="nav">
    <a href=""><img src="https://url.com/images/logo.png" title="" alt=""></a>
    <ul>
        <li class="page_item page-item-7 current_page_item"><a href="https://url.com/" aria-current="page">Home</a></li>
        <li class="page_item page-item-9"><a href="https://url.com/about/">About</a></li>
        <li class="page_item page-item-11"><a href="https://url.com/media/">Media</a></li>
        <li class="page_item page-item-13"><a href="https://url.com/music/">Music</a></li>
        <li class="page_item page-item-15"><a href="https://url.com/shows/">Shows</a></li>
        <li class="page_item page-item-23 page_item_has_children"><a href="https://url.com/shop/">Shop</a>
            <ul class="children">
                <li class="page_item page-item-24"><a href="https://url.com/shop/cart/">Cart</a></li>
                <li class="page_item page-item-25"><a href="https://url.com/shop/checkout/">Checkout</a></li>
                <li class="page_item page-item-26"><a href="https://url.com/shop/my-account/">My account</a></li>
            </ul>
        </li>
        <li class="page_item page-item-20"><a href="https://url.com/contact/">Contact</a></li>
    </ul>
</div>
```

What I'd like to do is highlight the parent when the child menu is displayed...like this:

[![enter image description here](https://i.stack.imgur.com/7Mblh.png)](https://i.stack.imgur.com/7Mblh.png)

[![enter image description here](https://i.stack.imgur.com/xKHI8.png)](https://i.stack.imgur.com/xKHI8.png)

I was thinking some JS might be needed here, I tried:

```
#head .nav > ul > li.page_item_has_children > a {
    border-bottom: 1px solid rgba(255, 231, 208, 0.5);
}

```

Which just puts the `border-bottom` on the Shows link all the time, whether the child `ul` is showing or not, is there a way to add the `border-bottom` only if `#head .nav ul.children li a` is showing?

Thanks,  

Josh