Center Element

alt36
Contributor

Hi, 

 

I am unable to center the element on my unsubscribe page. Can manipulate the element.style margin via inspect, but does nothing when I apply this to the head markup or wrapping. 

 

Have had similar issues with hs forms, ect. Would love to know if there is a universal workaround for this...

 

 

0 Upvotes
9 Replies 9
alt36
Contributor

Screen Shot 2018-11-09 at 10.54.13 AM.png

0 Upvotes
dennisedson
Community Manager

@alt36, could you provide a link to that page?

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
alt36
Contributor

Sure. Cloned the Hub default for styling.

 

https://app.hubspot.com/beta-design-manager/498479/templates/6398479258

 

Thanks

0 Upvotes
dennisedson
Community Manager

hey @alt36, you will need to provide a preview link.  I would have to be logged into your account to access this view

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
alt36
Contributor
0 Upvotes
dennisedson
Community Manager

@alt36, apologies for lack of clarity on my part --

you will need to share a page preview or published page using that template.  I will not be able to view any template links.  Anything in the design manager requires you to be logged into that acct.

 

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
alt36
Contributor

Ok, so I'm clealy inept when it comes to this sort of thing, but hopefully this works.

 

https://preview.hs-sites.com/_hcms/preview/template/multi?is_buffered_template_layout=true&portalId=...

 

It's an email template so I cant publish it, but tested it out in incognito so hoping this works.

 

Thanks!

0 Upvotes
dennisedson
Community Manager

 

so the input needs the margin-left: 0  replaced with margin: 0 auto

 

<input class="email-edit hs-input" type="email" style="padding: 6px; font-size: 15px; width: 507px; margin: 0 auto;" placeholder="email@example.com" name="email" value="">

would also suggest removing the margin-left: 5% from the span12 which is causing overflow.

 

span12.png

 

If this is an email template many email clients do not respect margins.  You will want to rethink the markup.  also, forms will not necessarily work in an email.  Run through litmus or the hubspot email testing service. 

 

here is the result with edits

Alternate36__Inc__Email_Services.png

 

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
alt36
Contributor

Ok awesome. Thanks Dennis!

0 Upvotes