- This topic has 24 replies, 4 voices, and was last updated 3 years, 5 months ago by Tom.
-
AuthorPosts
-
July 29, 2020 at 10:26 pm #1381347Joy
Hi Team GP,
Hope all is well.Issue 1:
I’m looking to remove the little arrows in the navigation menu. I found this code in the support forum which works:
@media (min-width: 769px) {
.menu-item-has-children .dropdown-menu-toggle {
display: none;
}
}But, it seems to make the space between menu items inconsistent. For example, the space between our first menu item (Lifestyle) and the second (podcast) is much wider than the difference between (podcast) and (about).
Any ideas on how to fix this? I took out the code for now given it looks pretty weird but let me know if you need me to add it back so you can see it better.
Issue 2:
I’m finding that the archive pages on my site (that have a list of all the posts) are looking nicely centered in the mobile view using Chrome’s developer tools but when I look at it on my actual phone, it’s off center. Any idea why this is happening?Many thanks,
JoyJuly 29, 2020 at 10:29 pm #1381350JoyAh sorry, I see David already replied to my other post re issue 1 (I couldn’t figure out how to see if anyone had replied, apologies) so will try that now. So just issue 2 per the above is where I need help many thanks!
July 30, 2020 at 1:25 am #1381483DavidStaffCustomer SupportHi there,
1. glad to hear you found the CSS.
I link the topic here for reference:
https://generatepress.com/forums/topic/remove-dropdown-arrows-from-navigation/#post-13756182. Looks like some of the CSS is getting scrambled by the cache plugin. Add this CSS to fix that:
@media (max-width: 768px) { .generate-columns { padding-left: 0 !important; } }
September 2, 2020 at 7:40 pm #1428596JoyThanks so much David,
#2 worked for the main archive pages however on each post, we have a “related articles” section that uses the “latest posts” block. And these are still looking very off center. I imagine they use the same code as the archive pages? Any idea how to fix this?
Many thanks,
JoySeptember 3, 2020 at 1:07 am #1428831DavidStaffCustomer SupportDid you resolve the issue with Related Posts ? It looks fine to me.
September 4, 2020 at 8:53 pm #1431428JoyHi David,
No unfortuntely not, it still looks skew on my mobile and on mobile preview. Here’s an image of what it looks like to me. Looks the same on both our phones unfortunately.
Many thanks in advance for any thoughts!
JoySeptember 5, 2020 at 4:01 am #1431671DavidStaffCustomer SupportYou can remove the right margin from the Related Posts lists on mobile with this CSS:
@media(max-width: 768px) { .wp-block-latest-posts.is-grid li { margin-right: 0; } }
September 5, 2020 at 7:23 pm #1432452JoyThat’s it! All sorted, thanks heaps!
September 6, 2020 at 5:57 am #1432734DavidStaffCustomer SupportYou’re welcome
October 14, 2020 at 8:37 pm #1489555JoyHi David,
Sorry to come back to this topic, we’re slowly redesigning each page so I’m tweaking as I go. I’m having trouble again with the spacing on archives and latest posts. While all looks great with mobile now (thanks to your help), the iPad view is off the page / looking wonky
I’ve put two links into the private information. The first is our standard archive page – if you use developr tools to look at this page and select ipad or iPad Pro, the excerpts fall off the page and the alignment is strange looking.
In the second link, you have to scroll down a little to see the “latest posts” list. If you use developer tools to look at this list as an ipad Pro, it’s sitting skew with too much padding / space on the right hand side. And if I look at it with iPad (not Pro), the posts are all bunched up on top of each other with again too much space on the right hand side – I’m going to replicate this page for all our category pages so keen to get it right.
Many thanks in advance for any advice,
JoyOctober 14, 2020 at 10:21 pm #1489640ElvinStaffCustomer SupportHi,
To clarify, do you need the latest post items to have space inbetween them?
The items seems to be sticking to each other and it looks like it was done on purpose as there’s a custom CSS adding a margin-right:0px on the code.
If this isn’t intended and you want space between them, please remove this code:
@media (max-width: 768px) .wp-block-latest-posts.is-grid li { margin-right: 0; }
And try this:
@media(max-width:768px){ /* remove margin-right for every right-most item only */ .wp-block-latest-posts.is-grid li:nth-child(3n+0) { margin-right: 0px; } /* center align everything else in this flexbox */ .wp-block-latest-posts.is-grid { display: flex; flex-wrap: wrap; padding: 0; justify-content: center; max-width: 100%; } }
October 15, 2020 at 12:18 am #1489769JoyThanks Elvin,
Re the custom CSS adding a margin-right:0px on the code – David suggested I add that code when I was having the issue with mobile (if you scroll up you can see the thread as it’s in the same conversation above).Would you mind confirming I should still remove it and try the replacement code you’ve suggested?
Many thanks and much appreciated,
JoyOctober 15, 2020 at 12:27 am #1489783ElvinStaffCustomer SupportAh my bad that makes sense.
@media 768px was affecting tablet as well. Perhaps we can keep David’s suggestion by doing this instead. So it applies on the actual smaller screens.Let’s modify David’s suggestion into this:
@media (max-width: 599px) .wp-block-latest-posts.is-grid li { margin-right: 0; }
And then add the code I provided on the previous reply for the tablet columns.
October 15, 2020 at 1:38 am #1489859JoyThanks Elvin, really appreciate the help.
I think I’ve done it right and mobile looks great but the iPad views still look off for both the site examples I shared. On the archives category page, the title and excerpt are wider than the images (ipad pro) and on the ipad, there seems to be no padding on the LHS
And on the other page, the latest posts look great but still aligned a little too much to the left.
Many thanks again,
JoyOctober 15, 2020 at 10:05 am #1490800TomLead DeveloperLead DeveloperFor the first page, the issue is that the image itself isn’t wide enough to fill the box, and the box doesn’t have any padding.
Try this:
@media (max-width: 1024px) { .separate-containers .generate-columns .inside-article { padding: 30px; } }
For the second page, remove the alignwide option from the block, then do this:
.wp-block-latest-posts.is-grid { margin-left: -20px; } .wp-block-latest-posts.is-grid li { padding-left: 20px; margin-left: 0; margin-right: 0; }
Hope this helps!
-
AuthorPosts
- You must be logged in to reply to this topic.