WordPress.org

Forums

Adelle
[resolved] Center navbar links without messing up the drop down (16 posts)

  1. frokenfri
    Member
    Posted 9 months ago #

    My problem is that I can't make the links centered in my navbar without making my dropdown menu move too. I'll keep it that way for now so that you guys can se the problem: http://frokenfri.nu/

    It's where I have: "kategorier"

    And I also want "kategorier" (categories) not to be clickable in the navbar. I just want people to be able to hover over it and see my categories.

    Can you guys help please? <3

  2. Andrew
    Nuh uh moderator
    Posted 9 months ago #

  3. frokenfri
    Member
    Posted 9 months ago #

    I'm sorrry but I don't get it :<

  4. Andrew
    Nuh uh moderator
    Posted 9 months ago #

    How familiar are you with CSS?

  5. frokenfri
    Member
    Posted 9 months ago #

    Not at all, I've just been playing around on my site. It's confusing since I used HTML a couple of years ago and now I'm all lost :c

  6. Andrew
    Nuh uh moderator
    Posted 9 months ago #

    How did you center the nav bar, was that through a setting in the dashboard?

  7. frokenfri
    Member
    Posted 9 months ago #

    I changed in the style.css so it looks like this:

    .nav ul {margin-left: 220px; list-style: none; max-width: 780px; display: inline-block;}
      .nav a {text-align: center; display: block; padding: 14px; color: #fff;}
      .nav a:hover {text-decoration: underline; color: #fff;}
      .nav ul ul a {display: block; padding: 14px; position: relative;}
  8. frokenfri
    Member
    Posted 9 months ago #

    So it's the nav.ul that doesn't like me ;b
    I think both the drop down and the navlinks go under the same code but I don't know how to fix it :/

  9. Andrew
    Nuh uh moderator
    Posted 9 months ago #

    If you're not using a Child Theme, and if the theme doesn't have a designated section of the dashboard for CSS modifications then install this Custom CSS Manager plugin http://wordpress.org/plugins/custom-css-manager-plugin

    Then use its "CSS Code" section of the dashboard to hold your CSS modifications:

    Alternatively use your Child Theme style.css file to hold your CSS modifications:

    .nav > ul > li a {
        text-align: center;
    }
  10. frokenfri
    Member
    Posted 9 months ago #

    Thank you! I'll try the plugin :D

  11. frokenfri
    Member
    Posted 9 months ago #

    I tried to copy-paste your code into the Custom CSS Manager Plugin Settings but it doesn't help :c

  12. frokenfri
    Member
    Posted 9 months ago #

    I fixed it with this:

    .nav ul {
        margin-left: 200px;
    }
    
    .nav ul ul {
        margin-left: 0px;
    }

    THANK YOU <3

  13. frokenfri
    Member
    Posted 9 months ago #

    But now I only have the problem with my caregories-page. I don't want that link to be clickable.. I just want the drop down to be xD

  14. Andrew
    Nuh uh moderator
    Posted 9 months ago #

    Was that caused by centering your navigation menu, or is this a different issue?

  15. frokenfri
    Member
    Posted 9 months ago #

    It's a different issue, should I make another post about it?

  16. Andrew
    Nuh uh moderator
    Posted 9 months ago #

Reply

You must log in to post.

About this Theme

About this Topic