You are viewing limited content. For full access, please sign in.

Question

Question

pagination tab color

asked on June 3, 2020

I need to have one pagination tab stand out regardless of whether or not it is active. How do I use CSS to change the background color of one tab and leave others to respond normally? I'm not sure how to reference it.

Review must stay yellow at all times.

0 0

Answer

SELECTED ANSWER
replied on June 3, 2020 Show version history

If it is always going to be the last tab, then you can use the following:

.cf-pagination-tabs li:last-child {
  background-color: red;
}

However, you could also use the order:

.cf-pagination-tabs li:nth-child(4) {
  background-color: red;
}

If you have pages that show/hide based on user selections that could change the ordering, you can right-click the tab in the browser to inspect the page and find the "page" attribute value (this corresponds to the ID of the actual page), and then you could reference it by that as well.

.cf-pagination-tabs li[page="q161"] {
  background-color: red;
}

 

2 0

Replies

replied on June 4, 2020

That work perfect.

Thank you!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.