Is there way I can hide the 2nd and 3rd ‘a href’ tag inside the li tag using CSS. Also, it needs to be hidden based on the attribute selector “isInternalUser=true” which is there in the first ‘a href’ tag. I know it can be achieve using the javascript but the framework I’m using there only CSS is supported hence would like to know if it’s feasible to hide it 2nd and 3rd element using the attribute selector.
<html>
<head>
<style>
.nav > li > [href*="isInternalUser=true"] + a,
.nav > li > [href*="isInternalUser=true"] + a + a {
display: none;
}
</style>
</head>
<body>
<ul class="nav nav-pills">
<li><a href="https://www.sapsfdemojobs.com/?isInternalUser=true" title="Home Page">Home Page</a></li>
<li><a href="https://www.sapsfdemojobs.com/careers" title="CMC Careers" target="_blank">CMC Careers</a></li>
<li><a href="https://www.sapsfdemojobs.com/home" title="Veterans" target="_blank">Veterans</a></li>
<li class="dropdown"><a class="dropdown-toggle" role="button" data-toggle="dropdown" href="#" aria-haspopup="true" aria-expanded="false" title="Find a Job" aria-controls="header1top3"> Find a Job <b class="caret"></b> </a>
<ul class="dropdown-menu company-dropdown headerdropdown" id="header1top3">
<li><a title="View All Jobs">View All Jobs</a></li>
<li><a href="https://sapsfdemojobs.com/content/CMC-Steel-Arizona-2nd-Micro-Mill/?locale=en_US&isInternalUser=true" title="Opportunities in Arizona">Opportunities in Arizona</a></li>
<li><a title="Business Support Jobs">Business Support</a></li>
<li><a href="https://sapsfdemojobs.com/content/Core-Career-Path/?locale=en_US&isInternalUser=true" title="Core Career Path">Core Career Path</a></li>
<li><a title="Drivers Jobs">Drivers</a></li>
<li><a title="Maintenance Jobs">Maintenance</a></li>
<li><a title="Operations Jobs">Operations</a></li>
<li><a title="Sales Jobs">Sales</a></li>
<li><a title="Students">Sudents </a></li>
<li><a title="Technology Jobs">Technology</a></li>
</ul></li>
</ul>
</body>
</html>
New contributor
Sanju R is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.