Center posts from latest news from Front Page


#1

I’d like to center the entry post n.3 like services and employees in landscape mode with mobile view.

Thanks.


#2

Hi,

If you are planing to show 3 posts apply custom css code below. You can apply the code with simple custom css plugin.

@media only screen and (max-width: 991px) {
    .home .blog-post:nth-child(3) {
    transform:translateX(-50%);
    left: 50%;
    }
}

If you want to display more then 3 posts, please remove this code.

Best Regards


#3

Perfect. It works! Thanks!


#4

You’re welcome,

Best Regards


#5

Sorry, but I only checked with Firefox (developer mode), and there it was working. Meanwhile, in real devices (as an iPhone) the 3 post appears on the right, and in vertical mode too.
Perhaps it needs more conditions in other @media screens…
Thanks.


#6

Hi,

Sorry, for that. Try to add browser prefixes, apply the code like this:

@media only screen and (max-width: 991px) {
    .home .blog-post:nth-child(3) {
	    -webkit-transform:translateX(-50%);
	    -ms-transform:translateX(-50%);
	    transform:translateX(-50%);
	    left: 50%;
    }
}

Best Regards


#7

Yeah! Now it’s working fine.
Regards!