Fixing the hover state

There are two ways in which we can fix the rounded corners getting lost when we hover over the Open Water submenu item. The first is using the last-child pseudo class, which you learned about a couple of sections earlier, to target the a selector and the last li selector of the submenu. This should work just fine, but if we want to get even deeper browser support, we need to use a different technique that uses overflow: hidden on the ul element—the parent. I tend to like the overflow: hidden approach here because it's minimal and has deeper browser support:

/****************Drop Down Menu****************/.has-submenu ul{  position: absolute;  top: 70px;  background-color: #fff;  border-bottom: 1px solid #ada791; border-left: ...

Get Mastering CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.