• Resolved bipin000

    (@bipin000)


    I had made 10 categories in my wordpress theme of which 3 categories and its subcategories i am using as menus and rest of categories i wish to use as sidebar for my theme. the problem which i am facing is the class of the menu:

    i am using wp_list_categories()->include my 61,62,63 categories in that
    and i checked its class assign by wordpress and modified that class in my css.

    but that same class getting implemented on my sidebar to i want to prevent it and use my new class using same wp_list_categories how can i help me

Viewing 3 replies - 1 through 3 (of 3 total)
  • Post a link to your site or at least name a theme you’re using.

    Thread Starter bipin000

    (@bipin000)

    twenty

    Thread Starter bipin000

    (@bipin000)

    yes now i got the solution i appended a div with a new unique id and get css to its child element and my problem is solved

    <div id="maincontent">
    
    <ul>
    <li>a</li>
    <li>b</li>
    </ul>
    <ul><li class="childres">1<li class="childres">2</ul>
    <li>c</li>
    </div>
    
    CSS used
    ====================
    
    #maincontent > li:nth-child(1)
    {
    mycustom css
    }
    
    #maincontent > li:nth-child(2)
    {
    mycustom css
    }
    
    #maincontent > li:nth-child(3)
    {
    mycustom css
    }
    
    #maincontent > li:nth-child(1)
    {
    mycustom css
    }
    #maincontent .childres>li
    {
    mycustom css
    }

    get help from :- http://css-tricks.com/5514-child-and-sibling-selectors/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HOW TO USE DIFFERENT CSS FOR SAME ELEMENT’ is closed to new replies.