- This topic has 15 replies, 2 voices, and was last updated 5 months, 2 weeks ago by
Fernando.
-
AuthorPosts
-
October 2, 2022 at 3:20 pm #2360901
Craig
I am using GP with the Target theme I have made some changes to my theme to add icons to the menu. Once the site is turned to landscape mode on a mobile device the page loses its clean look and the logos are out of place is there a way to tell the landscape version of the mobile site to use the menu it uses in the portrait version?
I have been looking at this topic that has some good information but I still can’t get the screen stretching to stop.
https://generatepress.com/forums/topic/mobile-site-in-landscape-mode/
October 2, 2022 at 7:11 pm #2360964Fernando Customer Support
Hi Craig,
For reference, can you provide the link to the site in question?
You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
October 2, 2022 at 10:07 pm #2361049Craig
This is the link if you look at the site on a mobile device and turn it to the side you will see what I mean thanks in advance https://geordiegadgets.co.uk
October 3, 2022 at 1:53 am #2361216Fernando Customer Support
The issue occurs around below
1273px
screen width. It’s occurring because of the structure. The menu forced at the Center of your Header, however, and at some point, it wraps because of your menu width. Basically, the header of this theme only works as expected if you have a small menu. Otherwise, the issue will occur.Two thing you can do is increase the Mobile Menu Breakpoint to 1273px, or change the structure.
October 3, 2022 at 4:51 pm #2362066Craig
Thanks, Fernando how would I go about adjusting the breakpoint to 1273 px?
October 3, 2022 at 6:47 pm #2362121Fernando Customer Support
You can do so in Appearance > Customize > Layout > Primary Navigation.
October 4, 2022 at 5:13 pm #2363400Craig
How do I do the same for the secondary menu thanks
October 4, 2022 at 7:01 pm #2363456Fernando Customer Support
Try adding this in Appearance > Customize > Additional CSS:
@media (max-width: 1273px) { .secondary-navigation .menu-toggle, .secondary-navigation .mobile-bar-items, .sidebar-nav-mobile:not(#sticky-placeholder) { display: block; } .secondary-navigation ul, .gen-sidebar-nav { display: none; } [class*=”nav-float-“] .site-header .inside-header > * { float: none; clear: both; } .secondary-navigation .main-nav>ul{ display:none; } }
October 5, 2022 at 11:10 am #2364449Craig
Thanks that works, however, the items show to the right of the page is there any CSS I can add to center the menu items? the menu is now functional in mobile landscape so that is a big leap in my design i am thankful for the help.
October 5, 2022 at 7:06 pm #2364678Fernando Customer Support
I see. Try updating the code to this:
@media (max-width: 1273px) { .secondary-navigation .menu-toggle, .secondary-navigation .mobile-bar-items, .sidebar-nav-mobile:not(#sticky-placeholder) { display: block; } .secondary-navigation ul, .gen-sidebar-nav { display: none; } [class*=”nav-float-“] .site-header .inside-header > * { float: none; clear: both; } .secondary-navigation .main-nav>ul { display: none; } nav#secondary-navigation.toggled > .inside-navigation { flex-direction: column; } .secondary-navigation.toggled .main-nav>ul { display:flex; } }
October 5, 2022 at 8:59 pm #2364735Craig
Thanks for that centered ok but it looks a little off due to the text being small there is a lot of space on each side. How would I go about getting both portrait and landscape to the left as it originally is on the portrait mobile site?
October 5, 2022 at 10:05 pm #2364779Fernando Customer Support
You mean display them horizontally? For instance, something like this?: https://share.getcloudapp.com/04uWQwW0
October 5, 2022 at 10:15 pm #2364786Craig
This would work
October 5, 2022 at 10:41 pm #2364793Fernando Customer Support
I updated the code here: https://generatepress.com/forums/topic/mobile-landscape-responsive-mode-stretched/#post-2364678
Can you try that?
October 10, 2022 at 7:15 pm #2369353Craig
This looks good thanks for the updated code. I will leave the site with the updated code and come up with some icons that will compliment the theme.
-
AuthorPosts
- You must be logged in to reply to this topic.