Grow your CSS skills. Land your dream job.

Adding Class To PHP for Color Vertical Menu

  • # April 18, 2013 at 6:08 am

    Hello I have a MENU Vertical that uses php

    I am trying to get to get it with the same background as this http://s10.postimg.org/y7l8h3zih/category.png

    each man category has color backround

    li color one #1F1F1F;
    li color two#232323;

    and then extends for the subs

    < ?php echo $heading_title; ?>

    ul.box-category, ul.box-category ul {
    list-style: none;
    margin: 0;
    padding: 0;
    }
    ul.box-category > li:first-child {
    padding: 0px 8px 8px 0px;
    }
    ul.box-category > li {
    padding: 8px 8px 8px 0px;
    }
    ul.box-category > li + li {
    border-top: 1px solid #EEEEEE;
    }
    ul.box-category > li > a {
    text-decoration: none;
    color: #333;
    }
    ul.box-category > li ul {
    display: none;
    }
    ul.box-category > li a.active {
    font-weight: bold;
    }
    ul.box-category > li a.active + ul {
    display: block;
    }
    ul.box-category > li ul > li {
    padding: 5px 5px 0px 10px;
    }
    ul.box-category > li ul > li > a {
    text-decoration: none;
    display: block;
    }
    ul.box-category > li ul > li > a.active {
    font-weight: bold;
    }

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".