0

Ok ,i am not a great fan of the menu of WP, but now it manage this inside pretty ok, i have to make theme that use that menu. Now for styling i am a bit challenge...

here is the problem... the menu should look like

| page1 | page2 | page 3 |

Do you see the problem, the border, let say each

  • will be style with border right 1px that work but first item will need a special class for border left

    Question. How do i know that it's first or last item in the menu to style it properly... or what is your way to style that type of menu...

    • Look like a thing for jquery – menardmam Mar 26 '11 at 23:10
    1

    Are you using CSS3?

    You could use:

    ul#navmenuid:first-child {
         border-left: 1px;
    }
    

    Or you could use (any LI that immediately follows an LI):

    ul#navmenuid li {
         border-left: 1px;
         border-right: 1px;
    }
    ul#navmenuid li + li {
         border-left: 0;
    }
    

    Or you could use (any LI that follow an LI, even if not immediately):

    ul#navmenuid li {
         border-left: 1px;
         border-right: 1px;
    }
    ul#navmenuid li ~ li {
         border-left: 0;
    }
    

    Lots of options via CSS, really...

    • it's not really ie6 friendly ? – menardmam Mar 26 '11 at 14:36
    • Same way you can use JQUERY! – Bainternet Mar 26 '11 at 20:51
    • I stopped caring about IE6 friendliness years ago. At most, I will use IE conditionals to add some margin fixes to correct IE's inconsistent box model, but that's it. – Chip Bennett Mar 28 '11 at 17:37

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

    Not the answer you're looking for? Browse other questions tagged or ask your own question.