Site logo

Archived topic

Centering items bellow single blog posts

7 replies · Started by Kle on April 2, 2018

Viewing posts 1–8 of 8

Hi,

I am using a pluging (Contextual Related Posts) to show related posts bellow single blog posts, but they appear lined to the right side and I want them centered. I looked in the support forum of the plugin where I found this code to do that:

.crp_related {
margin-left: auto;
margin-right: auto;
display: table;
}

The autor said it works with most themes, but it doesn't work with GP. What do I have to change to get the related posts centered?

Thank you.

Hi there,

Your site is under coming soon page so unfortunately we can't see.

Any chance you can unlock it?

Thanks!

Hi Leo,

The login credentials are in the OP after .net/

Thank you.

This is being caused by this CSS:

.crp_related li {
    position: relative;
    left: 10% !important;
    right: 10% !important;
}

Not sure if it's added by you or the plugin, but the left and right values are causing the issue.

Let me know if you need more info :)

Thank you Tom, I missed that which I put there a while ago when tyring to do the same.

I took it of but I can't still manage to dead center the related post, now with that code off they appear lined to the left :/

How can I center them?

Thank you.

Try this:

.entry-content .crp_related ul {
    float: none;
}

.entry-content .crp_related li, 
.entry-content .crp_related a {
    float: none;
    display: inline-block;
}

Awesome!

Thank you Tom!

Really appreciate it.

No problem!

This archived topic is closed to new replies.