CMS Development

Jlawal
トップ投稿者

CTA Button Alignment

解決

Hello,

 

My CTA button won't center vertically. It either spills off of the button onto the banner or stays at the very bottom or top of it.

 

I'm told that there is some CSS that will move it up into the center. 

 

Is anyone able to help me with this?

2件の承認済みベストアンサー
Jlawal
解決策
トップ投稿者

CTA Button Alignment

解決

Thank you for replying! Still getting the hang of this so i've only just seen the notification.

 

I managed to resolve it but thank you for taking the time out to get back to me 🙂

元の投稿で解決策を見る

areiter74
解決策
参加者

CTA Button Alignment

解決

How did you resolve it? 

<edit>

Nevermind! Got it. 

Custom CSS, in-line: " margin: 0 auto; text-align: center; "

元の投稿で解決策を見る

7件の返信
ndwilliams3
キーアドバイザー

CTA Button Alignment

解決

It's difficult to give a suggestion without seeing the page. Can you post the link to the page? 

Jlawal
解決策
トップ投稿者

CTA Button Alignment

解決

Thank you for replying! Still getting the hang of this so i've only just seen the notification.

 

I managed to resolve it but thank you for taking the time out to get back to me 🙂

areiter74
解決策
参加者

CTA Button Alignment

解決

How did you resolve it? 

<edit>

Nevermind! Got it. 

Custom CSS, in-line: " margin: 0 auto; text-align: center; "

adrian_davies
メンバー

CTA Button Alignment

解決

Hi

I'm having this problem on a number of CTAs. I've entered that CSS into the custom CSS field but it is till not aligning centrally. Any ideas?

 

CSS field for centre alignmentCSS field for centre alignment

0 いいね!
eobriant
参加者

CTA Button Alignment

解決

This still isn't working for me. Anyone have any ideas? 

Jlawal
トップ投稿者

CTA Button Alignment

解決

Try adding 'text-align: center;' to the modules css declaration in the template editor!

0 いいね!
acollart
参加者

CTA Button Alignment

解決

Not pretty, but this is what worked for us:

 

<!DOCTYPE html>
<html>
<head>
<style>
span {
display: block;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body>
<!--HubSpot Call-to-Action Code -->
<span style="border-width:0px;text-align: center;" .... 

<!-- end HubSpot Call-to-Action Code -->

</body>
</html>

0 いいね!