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 to access the following html code from console?

how to use browser console to change the text color and font size of the four rows below the row Other: Under the presets section of the website https://indiebubbler.github.io/metro/ . i know that set attributes can change the css but i am having trouble accessing those four rows in the console to apply the setAttribute to it.

[Edit : I understand that stackoverflow recommends including code snippet rather than link to the website but in this particular case the task is related to the DOM and thus it is better option to directly open the website and code in developers console.]

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

>Solution :

  • Open dev tools
  • Select the element you want to change using the cursor icon
  • Inside the element console right click on the specific element, go to copy and copy js path:
    enter image description here
  • Go to the console paste the copied path and change the styling using .style.property = "…":
    enter image description here
  • Note: once the page reload everything is reset to default style if you want this to stay use stylus or tempermonkey or any extension that inject CSS/JS code into the website
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