How to hide or remove the "x" to close the announcement bar?

I searched the forums and all I could find is this code:

.announcement-bar__close{

display: none;

}

which did not work. When I searched my theme file, I found this:

.announcementBar__close {
position: absolute;
right: 10px;
top: 3px;
margin: 0;
cursor: pointer;
padding: 10px 0;
opacity: 0.5;
}
.announcementBar__close:hover {
opacity: 1;
}

and totally removed it. That didn’t work either. How can I remove the option to close the announcement bar?

Hi @Anonymous ,

Not sure what theme do you have but try this code instead. Place it where you see the code .annoucementBar_Close.

.announcementBar__close{
display: none !important;
}

Marked as a solution if it helps

1 Like

@made4Uo that worked, thank you!

1 Like