Removing span after an anchor

Hi there,

I am trying to remove the span after a specific link in a breadcrumb trail.

This is the span I am trying to remove. I also have the link above it removed through CSS, but I can’t work out how to remove the first span.test only from the code,

I have tried this, but it’s not working:

div.container.breadcrumbs  > span > span  a.job + span.test{
display: none

Can anyone help with what I have wrong?

Thank you.

The class name seems to be “Jobs”, not “job”. :wink:

1 Like

is “test” used as a class in a lot of other places?

Is there a reason you can’t just do

.test {
 display: "none";

and call it a day?


Thanks for the replies and spotting the typo I’ve changed ot to .Jobs, but still no luck.

the .test class is used in other spans in the breadcrumb chain which is why I need to target just that one, but it needs to be targeted by using the link.

I’ve now tried this, but no luck:

div.container.breadcrumbs   span  span  a.Jobs  span.test{
display: none

And in the process you lost the + targeting the adjacent span. :wink:


The span.test is not a descendant but a sibling.

<meta charset="utf-8">
<title>Untitled Document</title>
div.container.breadcrumbs  span  span  a.Jobs + span.test{
	display: none


<div class="container breadcrumbs">
	<div class="breadcrumb">
		" You are here"
				<a href="#" class="Jobs">Jobs</a>
				<span class="test">/</span>
				<span>Some other span</span>

Your first example failed because you had a div as a direct child of the first div.

Your html was also missing a closing div in the image you posted.


beaten by Erik :slight_smile:


Then how about just this:

a.Jobs + span.test{
	display: none

Thank you :slight_smile:
The + was the thing that made it work


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.