Site logo

Archived topic

Position div after logo

3 replies · Started by Brad on March 22, 2021

Viewing posts 1–4 of 4

Good day Team GP.

I've exhausted my trial and error approach and I'm slopping with my CSS most of my work layout is using builder elements.

Trying to right align some text I put in a hook 'after logo' seen here: https://bradw11.sg-host.com/testimonials/

I wrapped it a class="grid-container" and now it's just center aligning. I can't seem to position it.

Thanks

Hi Brad,

You could try this CSS:

.inside-header.grid-container .grid-container {
    margin-right: unset;
}

But better use another CSS class other than grid-container next time, since there're quite a lot elements in GP site have the same class :)

Well that worked.. I changed the container name to something very original. I guess all that's needed is the margin: auto; then unset the right:?

Why does this work and not position: relative; right: 0 ?

Thanks!

Hi there,

Your container is using grid-container class.

This class is being used by the theme. It has margin-right: auto; property which adds space to the right.

position: relative respects margins and padding. If you used position: absolute; right: 0; , it'll work as you intended but that's not good practice..

This archived topic is closed to new replies.