Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can i hide this css object?

I’m pretty new to react-js or css and i want to hide a css object.

This is the code

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I tried to hide (make it unclickable) the object with this code

.react-aria9431256528-7 
{
display: none;
}

but this only works temporary. Every time i load the site, the id changes. How can i reference this object in way that it will always work? I was thinking about the aria-label since it is constant but how to i reference it?

Is there a better way than just to hide it?

>Solution :

If the aria-label attribute is unique, you can use the attribute selector syntax ([attr="value"]) as follows:

[aria-label="Help"] {
  display: none;
}
<a href="#" aria-label="Help">Help</a>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading