Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Alternating background colors for category items in sidebar category widget (http://forum.bytesforall.com/showthread.php?t=15819)

Cheers Oct 31, 2011 08:40 AM

Alternating background colors for category items in sidebar category widget
 
Is it possible to have alternating background colors for textual category items in a sidebar widget? Perhaps even a small alternating icon for each category?

I have attached a screen snap to show what I have. Notice that the categories alternate between mac and windows. It would be nice if I could tie a small mac icon to the post mac tags and a windows icon to the post windows tags. Then if I could alternate the line background colors, ie. blue for mac, green for windows or vice versa.

Any advice and/or help greatly appreciated

cheers.

:)

juggledad Oct 31, 2011 09:45 AM

if the categories had a class assigned to them, like 'mac' and 'windows' then you might be able to use some CSS to do what you want.

Cheers Oct 31, 2011 10:54 AM

How would I do that? There is nothing in the category editor that even indicates a place to put a class. I'd really appreciate it if you would show me how to do this. :)

lmilesw Oct 31, 2011 11:11 AM

You can use Firebug in Firefox to determine the classes. If you put those posts in the categories of mac and windows most like the class will be category-mac and category-windows

Cheers Nov 2, 2011 06:22 AM

I used Firebug to capture the html for the following two categories:

<a*title="View all posts filed under Arkanoid (MAC)"*href="http://yourbestgamesstore.com/category/arcade-action-4/arkanoid-38">Arkanoid (MAC)</a>

<a*title="View all posts filed under Arkanoid (WIN)"*href="http://yourbestgamesstore.com/category/arcade-action-6/arkanoid-40">Arkanoid (WIN)</a>

It seem to me that what determines the category in the first instance is /arkanoid-38"> and in the second instance /arkanoid-40"> I'm the one that put the (MAC) and (WIN) in the text that actually shows as the category on the page. Problem is that these games come in by rss feed and whenever a new game comes in it just ignores my changes and plops in a new category with no reference to either (MAC) or (WIN).

So It would be nice if I could remove all the (MAC) and (WIN) that I have added and get to a point where the rss supplied category would automatically put a different colored background with either a win or mac logo for each category.

Advice? :)

lmilesw Nov 2, 2011 07:05 AM

Firebug will show you the category. Then you use CSS in the CSS Inserts box of the theme options to give a background color to those categories.

The class will be on the <li...> that includes the <a...>


All times are GMT -6. The time now is 09:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.