Urgent - Aligning Shortcode

Hi can somebody kindly guide me on how to align this coding to the LEFT?

// Add Ad above the navbar
// =============================================================================
function ad_leatherboard(){ ?>
  
  <div class="custom-ad x-container max width center-text pam">
    <?php echo do_shortcode('[x_icon type="adjust"]');?>
  </div>

<?php }
add_action('x_after_view_global__nav-primary', 'ad_leatherboard');

Hi Suleen,

Thank you for writing in, on your code please change this class center-text to left-text

If that did not work, please provide us the direct page URL where we can see that icon.

Hope it helps,
Cheers!

Hi Friech,

it’s not working.
I have included the url in the secure note.
Thank you!

Hi Suleen,

Thank you for the URL, you did not mention that it was an ads slider. Please add this to Theme Options > CSS

.custom-ad {
	display: inline-block;
}   
.custom-ad .ml-slider-3-12-1 {
	margin-left: 0 !important;
}

Hope it helps,
Cheers!

Sorry I want to align right instead, I typed wrongly.
Anyway i just added the codings to CSS, i changed Left to Right.
But now the entire banner is really low. I need it to be higher, and more towards the right under the menu.

Please help.

Hi Suleen,

Ok, in that case, please remove the custom CSS I’ve provided.

And then update your function code above,

Update this line:
<div class="custom-ad x-container max width center-text pam">

To this:
<div class="custom-ad x-container pbm right">

Cheers!

Yes it works!
Thank you so much! :slight_smile:

We are delighted to assist you with this.

Cheers!

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