SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2013
    0 Post(s)
    0 Thread(s)

    WordPress Navigation Help

    Hey everyone,

    I was hoping someone could help me figure out an issue I was having with the site navigation on a WordPress site I'm working on. The link to the site is . I'm trying to fix the current page item issue I am having. The page that indicates what page you are on is supposed to have a blue background which it does, but when I go to make it line up with the rest of the navigation it messes with the other elements on the page. I used the code -

    #access ul li.current_page_item {
    background-color: #4381a3;
    height: 46px;
    margin-top: 7px;

    Using the margin-top and height makes it line up but the other elements on the navigation are then messed up. Should I use different code or is there something I haven't added or that needs to be taken out? Hope this all makes sense and thank you to everyone that tries to help out.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Melbourne, AU
    463 Post(s)
    8 Thread(s)
    Hi A-Town. Welcome to the forums.

    Firstly, remove the top margin on the current LI and remove the background color from the LIs. Instead, set the <a>s to display: block, and put the background color on them. E.g.

    #access .menu .current_page_item a {
      display: block;
      background: #4381A3 url("/wp-content/themes/als-child/siteelements/nav_line.png") no-repeat right bottom;


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts