Can't change short codes positions

Can I just give them all the same class name? And do I name them in SECTION>CUSTOMIZE>SETUP>CLASS?
That way we can just add the css in THEME OPTIONS and all I have to do is give them the same class name. Let’s name them center-class.

That would be so much easier for me then having to figure out how to center them individually.

Hi @Haumesser,

Yes, you could do that. That’s the main purpose of the class name, so it can be re-use compared to an ID which should be identical and added once.

Thanks!

GREAT! What would the css be to center anything with the class name center-class ?

Hi @Haumesser

Theoretically, something like that should work:

.center-class {
    margin: 0 auto;
    text-align: center;
}

Please try to apply it and in case it doesn’t work, provide us with the page link showing this issue so we can investigate.

Thanks.

Ok, I applied the CSS that you gave me in THEME OPTIONS CSS and tested it out, but it’s not centering the short codes that I added the center-class name to.

I’m testing out another video player and a countdown timer. Here is the test page: https://philliphaumesserphotography.com/test-page

Hi There @Haumesser

Can you try updating your CSS rule as follows and see if that helps.

.center-class {
    margin: 0 auto !important;
    text-align: center !important;
    max-width: 1170px;
}

Make sure to clear your server/browser cache before testing.
Thanks!

Ok, that worked for the video player but not for the countdown timer.

Hi @Haumesser,

You should remove the style attribute from your image code, example

<img src="https://gen.sendtric.com/countdown/aid8n8r72r" style="display: block;" />

should be like this

<img src="https://gen.sendtric.com/countdown/aid8n8r72r"/>

Then the alignment should work.

Thanks!

FANTASTIC! It’s working and it seems to be working with other short codes too! Thank you so much!!!

Glad we were able to help :slight_smile:

If you have further issues, please create a new thread as this thread is getting longer.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.