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.
- 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".
- Now double-click on the element that you want to get: right click on the mouse button and choose “Copy”:
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