Site logo

Archived topic

Primary Menu Floating Right: Menu items floating left in sticky menu

9 replies · Started by Alex on January 19, 2016

Viewing posts 1–10 of 10

Hi,

I'm encountering the following problem on two sites independently:

Set up:
- I have a primary menu set up as sticky & Navigation position as "Float right". The Primary menu has sub-items.
- I also have a secondary menu set up as "Above Header"

When I'm on top of the page, the primary menu floats right as expected. When I scroll down, the sticky menu appears – all menu items float to the left now, though. Only the search icon stays on the right.

Please also see screenshots:
Menu on top of the page working as expected:
http://prntscr.com/9s0gli
Menu item floating left in sticky menu:
http://prntscr.com/9s0gwp

I would like the menu items in the sticky menu to float right as well. I searched for a corresponding setting, but couldn't find anything. Am I missing something?

I'm running WP 4.4.1 and GP Premium 1.2.74. Both sites are not live yet.

I'd be really gratefull for a hint!

Cheers
Alex

Hi Alex,

This has been fixed in the next version of GP Premium.

You can fix now with this CSS:

.nav-float-right .navigation-clone.main-navigation .menu > li {
	float: none;
	display: inline-block;
	*display: inline;
	*zoom: 1;
}

.nav-float-right .navigation-clone.main-navigation ul {
	letter-spacing: -0.31em;
	font-size: 1em;
}

.nav-float-right .navigation-clone.main-navigation ul li {
	letter-spacing: normal;
}

.nav-float-right .navigation-clone.main-navigation {
	text-align: right;
}

Hi Tom,

thanks for your reply. And sorry again for my late feedback.

I tried using your CSS fix by putting it into my child theme style.css, but it didn't work, even with "!important" declarations.

What am I missing?

One of the sites is live now if you care for a look.
http://trans-history.org/

Cheers
Alex

Remove this from your child theme CSS:

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

}

It's not CSS, so none of your CSS below it is being read.

It would be added to your functions.php file, but it's not necessary there either :)

Wow, you're totally right, what's that doing there? That's pretty embarassing.

My CSS was being read though, and your css fix is still not working.

But I'm totally fine with waiting for the next issue of GP Premium ;-)

Cheers

Alex

Remove this from your style.css as well - it seems to be commenting out your code:

/* Temporary fix for GeneratePress sticky menu not aligning to the right as desired
****************************************** /

You're totally right. Now it works just fine. Sorry, I could've checked that myself.

Thanks so much!

You're welcome :)

Hi,

I'm having the same problem with menu items floating left when scrolling down using the sticky nav bar. I haven't changed the CSS, and only have one minor custom class in my "Additional CSS" customer. I'm merging my content with a Header Element.

I can't seem to find where the justification options are for the sticky nav bar.

WP 5.8.2
Generate Press 3.1.0
GP Premium 2.1.1

Hi Jon,

Can you open a new topic and link us to your site?

Thanks!

This archived topic is closed to new replies.