Hi there,
We use browser developer tools, example, the google chrome inspector (https://developer.chrome.com/devtools). Then we inspect the element to see the code. If you wish to use a class base selector, then look for class and use DOT. Example,
<div class="el54 x-anchor">
Then the selector will be .el54.x-anchor
, and if you’re selecting an element based on parent-child relationship
<div class="el54 x-anchor"><div class="x-text awesome">
Then it will be like this .el56.x-anchor .x-text.awesome
, use space for parent-child hierarchy. And use the comma if you’re selecting multiple elements, like .el56.x-anchor .x-text.awesome, .el57.x-anchor .x-text.hello
Now, if you’re selecting based on ID, then use #
instead of DOT. Example,
<div id="awesome_section" class="x-section">
Then you can have different selector, like #awesome_section
, or #awesome_section.x-section
, both are just the same and you can combine ID and Classes selector.
Hope these helps.