Move Navigation below Slider

Homepage Community Forums Ally Theme Support Move Navigation below Slider

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7315
    Jamie
    Customer

      Hi,

      Just wondering which genesis hook I should adjust too when trying to re-position the Primary Navigation below the Slider?

      // Reposition the Primary Navigation
      remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ ) ;
      add_action( ‘genesis_after_header’, ‘genesis_do_nav’ );

      Based on having a look at the visual hook guide there are no real hooks for moving this navigation below the slider, should this just be done using CSS?

      Thanks!

      #7329
      Eric
      Customer

        Use after_header like you’re doing, but add a priority to the Slider so it shows up above the nav. You’ll have to play around with the numbers until it gets in the right spot you want.


        I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com

        #7458
        Jamie
        Customer

          Where do I set the priority? As in adjust the zindex in css? Or somewhere in the JS?

          Thanks!

          #7459
          Jamie
          Customer

            .slider {
            background-color: #fff;
            background-image: -webkit-gradient(linear,left top,left bottom,from(#fff),to(#f2f2f2));
            background-image: -webkit-linear-gradient(top,#fff,#f2f2f2);
            background-image: -moz-linear-gradient(top,#fff,#f2f2f2);
            background-image: -ms-linear-gradient(top,#fff,#f2f2f2);
            background-image: -o-linear-gradient(top,#fff,#f2f2f2);
            background-image: linear-gradient(top,#fff,#f2f2f2);
            position: relative;
            top: -100px;
            z-index: 1;
            }
            .nav-primary {
            clear: both;
            line-height: 1;
            margin: 0 auto 40px;
            overflow: hidden;
            width: auto;
            z-index: 50;
            position:relative;
            top: 570px;
            }

            I did that, it’s working fine in Firefox but I assume it’s going to break on portability or some browsers but perhaps this will help others set me right.. I assume z-index is being totally ignored and its just the positioning values I have used that is moving things around though?

            #7486
            Eric
            Customer

              Priority should be added to the action not the css. Like this –

              add_action( ‘genesis_after_header’, ‘genesis_do_nav’, 12 );

              Start from 0 and keep raising the number until it gets in the position you want.


              I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com

              #7606
              Jamie
              Customer

                Thanks, gave that a go and it doesn’t seem to make much difference. Using 12 put’s it right below all the home page widgets.

                Do I need to set the priority on other elements that are being displayed in that area? I had a quick look in functions.php and couldn’t really see where I would add the priority for the slider itself.

                The main goal for moving the primary navigation below the slider is so the the drop downs menu items are not hidden. Not using a menu in the “Header Right” widget on this occasion.

                #7633
                Eric
                Customer

                  I actually meant to start from 0 and work your way up to around 12 or so until you see the nav show up after the slider….or you could just add a priority to the slider and move it up instead to make things easier.

                  By the way, the slider code is inside the home.php file, if you want to try adding a priority to it instead of the other way. Either way works, I’ve done it before in the past.


                  I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com

                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.