Site logo

Archived topic

move the logo to the corner

15 replies · Started by makaouif on September 3, 2020

Viewing posts 1–15 of 16

done
but it move to the extreme right, you can check

Looks like you've set the alignment to right.

Can you try location float right first?

Also I'm seeing a merged header element. Is that necessary?

Thank you for you answer Leo
i don't think that i do it correctly (i dont know how to use filter) , but thats what i put in Customizing > Additional CSS
-----------------
add_filter( 'generate_navigation_location','tu_move_navigation' );
function nav-float-right( $location )
{
return $location;
}
----------------------
please advice

Hi,

WordPress filters are PHP codes.

For them to work, you have to add them as such.

Here's how to add PHP codes to your site.
How to add PHP

Let us know how it goes.

Thank you Elvin
I already using a child theme, and i add the filter in functions.php.

add_filter( 'generate_navigation_location','tu_move_navigation' );
function tu_move_navigation( $location )
{
		
	return $location;
}

Where should i put nav-float-right

Hi there

you should not need that PHP Snippet.

1. Go to Customizer > Site Identity and display the Logo.
2. Go to Customizer > Layout > Header and select Navigation as Header.
3. Go to customizer > layout > Priamry Navigation and set the Alignment to Center.

Let me know.

The size of the logo inside a Navigation is controlled by the Menu Item Height in Customizer > Layout > Primary Navigation. Increase that size to 60px to see the difference.

If you want to increase the size of logo independent of the menu item height then add this CSS:

.navigation-branding img {
    height: 60px;
}

But i recommend you do increase the Menu Item height as currently 27px is very small and Google will complain about Clickable Elements being too close together. We recommend 60px.

Thank you David for your assistance and help
1) When i put to increase the size of logo independent of the menu item the height it drive the bottom line of the menu with the logo as in the image attached


.navigation-branding img {
    height: 90px;
}

2) and what i expected and i want is to increase the size of logo independent of the menu item height as in image here

3) i’m asking if the is possibility to put the margin-right & and padding of the logo (0) as in the image here

https://drive.google.com/file/d/1F4edt-LkVRpntkvlcwraMNufLAxKKAzW/view?usp=sharing

https://drive.google.com/file/d/1OYH_ejCtATM8z-a7r3zY4luW9HrfjuNK/view?usp=sharing

https://drive.google.com/file/d/1aL83x2EaAOik1hxMhv01IJF_X00QhSR-/view?usp=sharing

Regards

Try adding this CSS to make the logo overlap the Nav and the header element:

.main-navigation .inside-navigation {
    max-width: 500px;
    position: relative;
}
.main-navigation .inside-navigation .navigation-branding img {
    position: absolute;
    left: 0;
    top: 0;
    height: 160px
}

Hi there,

Give this a shot:

.rtl .main-navigation .inside-navigation .navigation-branding img {
    left: auto;
    right: 10px;
}

Thank you very much Tom
it function very well 👍 🧡

This archived topic is closed to new replies.