I suppose the problem is with removing the border from the logo than with targeting an element, because it has an identifier, so targeting is as simple as #logo
.
The first thing you need to do to exclude the logo from the border is to apply the property to the list items instead of the <ul>
container, after which you simply redefine the style in the following rule:
#nav li{ display: inline-block; border-color: #FFB405; border-style: solid; border-width: 1px 0; } #nav #logo{ border: 0; }
Finally, if you come up and apply these styles, you will notice a gap between the elements of the list, this is caused by the display:inline-block
property and the space in the HTML markup, you can check this answer for several ways to properly manage this.
Here is a complete description of the solution in jsFidlle
source share