Home › Forums › Product Support Forums › Related Posts Pro for WordPress Support › flex-box justify center
This topic contains 4 replies, has 2 voices, and was last updated by Ernest Marcinko 7 years, 7 months ago.
- AuthorPosts
- February 1, 2017 at 5:45 pm #11795
hi – how do make the items all flex-box justify center? right now they are all starting from the left leaving gaps at the end of the item-list…
i had this code from another plug that worked but if i add i to the custom CSS it’s braking this plugin’s layout:
#horiz div[id^=”relatedpostspro_0_”],
#horiz div[id^=”relatedpostspro_0_”].rpp,
#horiz div[id^=”relatedpostspro_0_”].rpp *,
#horiz div[id^=”relatedpostspro_0_”] * {
width: 100% !important;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -moz-flex;
display: -webkit-flex;
display: flex;
-webkit-justify-content: center;
justify-content: center;
text-align: center;
}February 2, 2017 at 7:14 am #11798Hi!
I would not recommend using that CSS, it sets a flex layout on all descendants of the main container, and it indeed will break the layout.
Instead, try something like this one:
.rpp_wrapper { display: flex !important; justify-content: center !important; flex-wrap: wrap; max-height: 1400px !important; } .rpp_wrapper .rpp_item { position: static !important; max-height: 200px !important; }
I cannot guarantee it will work, as the there are calculations done via javascript, when chancing the screen layout, but it’s worth a try.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 2, 2017 at 4:19 pm #11801ahh ok that works 🙂
also – how do i center the title text? cant seem to make it happen via CSS…
And lastly:
i have custom post type “portfolio” and posts – the results only show posts inside a posts page, and portfolio in side a portfolio page…how do i get it to show from both assets inside any page?
it doesn’t seem to be weighing the tags when a post and a custom post have the same tags…February 2, 2017 at 7:05 pm #11803actually – that CSS makes only the first item link the whole section…
still:
i have custom post type “portfolio” and posts – the results only show posts inside a posts page, and portfolio in side a portfolio page…how do i get it to show from both assets inside any page?
it doesn’t seem to be weighing the tags when a post and a custom post have the same tags…February 2, 2017 at 7:24 pm #11804Hi,
It looks like the overlay might be flowing into the content. Try add this css too:
.rpp_item .rpp_inner { position: relative !important; }
It will make sure the overlay stays within the items.
It didn’t show posts on one page and portfolios on others, because the portfolio category was selected for matching – and posts does not have portfolio categories. And it didn’t show portfolio pages on posts because categories and tags doesn’t exist for portfolios. They all have different taxonomies.
Best,
I have disabled matching taxonomies, and now I can see mixed results for both posts and portfolios.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
The forum ‘Related Posts Pro for WordPress Support’ is closed to new topics and replies.