Hi. How can we help?

How to get the CSS class or the ID of an element of the page

It may happen that some of the snippets available in this Help Center require you to enter a CSS class or ID.

The purpose of this article is to show you how to do it easily. We’ll use Google Chrome as an example but the process is very similar also in other browsers.

  1. Find the element on the page from which you need to retrieve the CSS class or ID, right click on the mouse button then click on "Inspect". hc1.png
  2. Now double-click on the element that you want to get:2.png right click on the mouse button and choose “Copy”:3.png

Then paste it where needed by following these rules:

  • If you have copied the ID, add  # before the ID. For example: #quantity_60d1c22902853
  • If you have copied the CSS classes, add a dot as the first character and replace any space with a dot. So, for example, input-text qty text becomes .input-text.qty.text
Was this article helpful?
0 out of 3 found this helpful

Back to Help Center >