How can i select only

Hello. How can i select only Charles’ message? This is the class. They’ve the same class and how can i select this. Its chat so i cant say first or late. Please help.

Can you change the html?

If not, then no, there’s no way to select css based on the content of an element. You’ll need to use javascript to assign a css selector.

If you can change the html, then you could add a data attribute and select based on that.

When you say “Charles’ message” on what basis are you specifying that message?
Because it’s the first message in the list?
Because it contains the text “Charles”?
Because it has some identifying attribute applied to it (such as a class, id or data attribute)?
Or something else?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.