CSS sticky posts

Hi,
is possible to insert css styles just for sticky post? I already see it in the first place, (thanks to the topic Sticky post display within Posts module, but I can’t figure out what class names to insert. .sticky or .sticky_posts doesn`t work…
Will anyone help? Thank you.
Milu

Try a :first-child pseudo selector on the element wrapping the post… so if it’s a post grid module and each post has a class of .fl-post-column, use:

.fl-post-column:first-child { color: pink; }

Thank you very much. .fl-post-column didn’t work, but thanks to you, I found the right one: .fl-post-feed-post:first-child

Thanks :slight_smile:

I realized that every first post is highlighted. Not just a .sticky post…

Can you share an URL showing a Posts grid with a sticky post and specify which one is the sticky post?

URL is here and the sticky post is the first: “Informace pro rodiče a žáky”.
Thank you.

Hi @milu, the idea was to use the sticky post specific class… if it had one.
You could have target the post this way in CSS:

.sticky {
   your styles here
}

Unfortunately, i can’t find a specific sticky class in your page code.

Reading this article in WP codex, it should have one though (see at the end of the article):

So, i wonder if the lack of this specific class is due to the theme used (not BB Theme apparently) or BB Posts module.
I suggest you contact the theme author and/or BB support and ask them why there’s no specific class for sticky post in the page markup.