I am trying to style a wordpress widget and I can access the (4) string from below code, I want to style it with CSS , any help is appreciate it.
<li class="cat-item cat-item-3 current-cat"><a href="http://local.w.com/category/beauty/">beauty</a> (4)</li>
Thank you.
First you should style the βliβ element, then change the style of βli aβ, itβs simple bro. Cheers.
1 Like
I am reffering to just the (4) string inside the li, with li a I can style the a not what I want and with li I can style a and the (4), I just want to style the (4) string only that.
You need to style the a tag separately and the add style for the li for the (4) string. You might need to override style for the a tag
The problem is that this li element is generated by wordpress I canβt alter it to wrap the (4) in a span for example, is it possible to access just the (4) value to style it, really tricky one.
Yes that category count is generated by WP itself but I am not asking you to wrap it inside span or else. I suggested you to style the li as per you like for the string and then style the a tag separately as you like.
Hmm . You have a good point there I will give it a try. Thank you for your suggestion.
Yes, I said the same as @imithemes.
Thank you guys, I appreciate it. Working on my first theme, is overwhelming but exiting at the same time. I hope I will pull this trough.