mantralux
Member
Posted 1 year ago #
Problem: I want to add the div ".banner" to all comment posts by the author of the article. But when I use .bypostauthor to target the author posts, all nested replies to the author comment also gets the .banner div.
I don't really understand how I can target only the .bypostauthor without any nested replies being targeted.
How would you guys solve this?
Where would you put the <div class="banner"></div> line?
How would you target it with CSS to avoid nested replies to also get the div?
Thanks!
Ad the banner (via CSS background) to .bypostauthor, then remove that background for .bypostauthor li elements.
mantralux
Member
Posted 1 year ago #
Adding the banner as a background to just the .bypostauthor class is not an option in my case I'm afraid. I need to insert a div into every comment made by the author, but somehow I need to get a round the fact that anything applied to .bypostauthor also gets applied to its nested replies.
mantralux
Member
Posted 1 year ago #
Also, I can get it to work if I only have 2 levels of nested comments, but as soon as I go over that amount, it starts adding the .banner div to nested replies.