problem with column display

  • Mod

    Kenneth John Odle


    Well, you can’t really do an “if…then” statement in CSS.

    How about just setting the “current-menu-item” link to be the same as the hover color?



    I did try this, the problem was that there are six different tabs, for which i want to associate six different colors. If i set the current-menu-item with a specific color, each one of the six tabs will display that color, no matter what. This is, actually, how i have it now. More specifically, I would like that, when i click o the first tab, instead of #e3e3e3, it would show the violet i had there. Then, if i click on the next, it would turn blue. and so on. Right now, when i click on a tab, it takes the #e3e3e3 color, i found no way around it yet.


    Kenneth John Odle



    I think I got it now. Basically, you want a different “current-menu-item” color for each item.

    In that case, I think you want something like:

    li #menu-item-170.current-menu-item {color:#fff; background#000;}

    We are treading into unknown territory here, but basically this means “apply these styles to menu item #170 only if it is of class .current-menu-item“.

    My syntax may be off, but I think we are on the right track. You will want to use the appropriate ID numbers, of course.

    If that doesn’t work, the syntax may be:

    li .current-menu-item#menu-item-170 {style;}

    There is NOT a space between the class and the id in this declaration. That’s what makes it work.

    Not tested, but worth a shot.



    Sweet and a thousand thanks! looks like the second syntax

    li .current-menu-item#menu-item-170 {style;}

    works just fine! Whitout the space between li and the current-menu-…



    Kenneth John Odle


    Cool! I knew we’d get there in the end!

Viewing 5 posts - 11 through 15 (of 15 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!