Need Help With Wordpress Menu

Discussion in 'CSS' started by Neptune, May 16, 2013.

  1. #1
    I am in need of help right away. I cannot center the text in my menu. I have added
    text-align: centered;
    Code (markup):
    and it does not work. I will pay someone five dollars right now through paypal to help me. Please respond here or in pm for the url. Thanks!
     
    Neptune, May 16, 2013 IP
  2. David Alley

    David Alley Member

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #2
    Would you post the URL here so that we can look at it - I'm sure someone will tell you what to do without you having to spend $5.
     
    David Alley, May 16, 2013 IP
  3. Neptune

    Neptune Well-Known Member

    Messages:
    1,465
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    108
    #3
    I can't post the url here. That is why I asked for someone to pm me. Do you know how to do it? I will send you the url in a pm or the css.
     
    Neptune, May 16, 2013 IP
  4. Neptune

    Neptune Well-Known Member

    Messages:
    1,465
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Here is the CSS for the navigation.

    /*Navigation Style*/
    #main_nav  {
       
            position: relative;
               width: 100%;
       height: 40px;
       background: url(images/nav_bg.jpg) repeat-x scroll 0 0;
    }
    #main_nav ul li {
       display: block;
               float: left;
    }
    #main_nav ul li span {
       width: 2px;
       height: 4px;
       background: url(images/main_nav_sep.jpg) no-repeat scroll 0 0;
    }
    #main_nav ul li a {
            
        font: bold 17px/17px Arial, Helvetica, sans-serif;
        color: #FFFFFF;
             text-align: centered;
        text-shadow: 0 2px 2px #0378d2;
               /*margin: 0px 86px, 0px 86px;*/
       margin: 0px 14px 0px 14px;
    }
    #menu-item-21 .sep {
      display:none;
      
    }
    .current-menu-item a {
       /*text-decoration: underline;*/
            
    }
    #main_nav ul li a:hover {
       text-decoration: underline;
    }
    #main_nav .nav_ext {
       position: absolute;
       display: block;
       width: 32px;
       height: 81px;
    }
    #main_nav .nav_right {
       background: url(images/nav_right.png) no-repeat scroll 0 0 transparent;
       top: 0;
       right: -32px;
            
     
    }
    #main_nav .nav_left {
       background: url(images/nav_left.png) no-repeat scroll 0 0 transparent;
       top: 0;
       left: -32px;
    }
    Code (markup):
     
    Neptune, May 16, 2013 IP
  5. David Alley

    David Alley Member

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #5
    post the URL like this www.website.com or it that doesnt work go website.com/rest
     
    David Alley, May 16, 2013 IP
  6. David Alley

    David Alley Member

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #6
    you can also try website dot com/otherpages dot html
     
    David Alley, May 16, 2013 IP
  7. Neptune

    Neptune Well-Known Member

    Messages:
    1,465
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    108
    #7
    That is not what I meant. I cannot post the url out in the open.
     
    Neptune, May 16, 2013 IP
  8. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #8
    Floated menus cannot be centered unless you have a crappy inaccessible fixed width on every element and UL itself... It is likely about half that CSS has to be pitched in the trash just to center the menu.

    ...and if you can't show the URL it's unlikely anyone can offer real help as snippets are useless; though the markup the CSS is being applied to might help a little; CSS without the markup it's applied to is gibberish. ... of course being turdpress, the markup for that menu is likely a class-heavy terrifying mess of ineptitude since they LOVE to shove ineptly coded garbage down your throat.
     
    deathshadow, May 16, 2013 IP
  9. xtmx

    xtmx Active Member

    Messages:
    359
    Likes Received:
    12
    Best Answers:
    4
    Trophy Points:
    88
    #9
    "centered" is not a valid text-align value. Should be "center"

    I'm surprised nobody mentioned that yet.
     
    xtmx, May 16, 2013 IP
  10. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #10
    Not that it matters since this:
    #main_nav ul li {
       display: block;
               float: left;
    }
    Code (markup):
    ... means text-align isn't gonna do anything.

    ... and is nonsensical since floats are inherently block!
     
    deathshadow, May 16, 2013 IP
  11. xtmx

    xtmx Active Member

    Messages:
    359
    Likes Received:
    12
    Best Answers:
    4
    Trophy Points:
    88
    #11
    xtmx, May 16, 2013 IP
  12. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #12
    kk5st, Jun 8, 2013 IP
  13. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #13
    @OP
    For a general case method, try this:
    
    ul {
      padding: 0;  /*removes the indent*/
      list-style: none;
      text-align: center;
      }
     
    li {
      display: inline-block;
      margin: 0 1em;
      }
    Code (markup):
    cheers,

    gary

    //edit: My apologies. I did not notice this is 3 weeks old. Curse you dp and your catastrophic failures.
     
    kk5st, Jun 8, 2013 IP