CMS Development

marianberry
投稿者

Converting image module to display as a block

Hi all-

 

Working on my practicum for the Hubspot Design Cert and feeling like a dummy. I am trying to get and image centered in the image module on my page, and when I attempted to add CSS that would make the image display as a block and then auto-align right and left from there, nothing. However, I then told it to text-align: center and voila, the image is centered.

 

Does HS not allow the image module to display as a block if you edit the CSS declarations? I *think* I'm entering the code right, but here is a screenshot for reference.Screen Shot 2018-02-07 at 10.33.37 AM.png

0 いいね!
8件の返信
roisinkirby
HubSpot製品開発チーム
HubSpot製品開発チーム

Converting image module to display as a block

Hey @marianberry are you still experiencing this issue? This wouldn't be my area expertise, but I'll tag some of our resident experts for their input 🙂

@benvanlooy@EricSalvi@Josh

marianberry
投稿者

Converting image module to display as a block

@roisinkirby! Thank you so much for caring. I was hoping I wasn't just a baffoon, but after coming back to this on a few occassions, I still have yet to solve this one. I'll repond to @benvanlooy below now and see if we can figure out my issue.

0 いいね!
benvanlooy
トップ投稿者 | Platinum Partner
トップ投稿者 | Platinum Partner

Converting image module to display as a block

Hi Marian,

 

The inline css is meant for real inline css, not for defining classes.

 

 

To center, you could add inline css for the image (if that's an option), set it to " margin:auto " .

 

Is it possible to show us a preview link of what you have?

It's always easier to see the code and help 🙂

 

 

marianberry
投稿者

Converting image module to display as a block

@benvanlooy

 

Thank you so much for your suggestion and response.

 

Okay I published the page:

 

http://example-4262163.hs-sites.com/oregon-recycling-info

 

And now that I published the page, I have another question. I can't see any of my CSS (from an attached stylesheet) in the head, but I tested some of it out and it is working.

 

Presently, I have tried your suggestion both in the image module and in the attached CSS sheet and it has no effect on the image.

 

Thank you so much for taking the time to respond. (Screenshot of the stylesheet below.)

adding margin:auto to the inline styling for the image blockadding margin:auto to the inline styling for the image blockcreating a custom class using margin: auto in the stylesheet. Applying the class in the module block did not do anything.creating a custom class using margin: auto in the stylesheet. Applying the class in the module block did not do anything.

0 いいね!
marianberry
投稿者

Converting image module to display as a block

Hey @benvanlooy, did you ever get a chance to check this out? 

0 いいね!
marianberry
投稿者

Converting image module to display as a block

@benvanlooy and @roisinkirby, stay with me.....drumroll....

 

https://knowledge.hubspot.com/articles/kcs_article/email/how-do-i-center-an-image-cta-or-logo-in-an-...

 

Can I safely assume the same holds true on page templates?

0 いいね!
benvanlooy
トップ投稿者 | Platinum Partner
トップ投稿者 | Platinum Partner

Converting image module to display as a block

it should work on page templates also 😉

0 いいね!
marianberry
投稿者

Converting image module to display as a block

Thanks @benvanlooy! I think my comment may have been misunderstood. I was more interested to learn why I couldn't center my image by using the converting it into a block, but essentially the link I just sent through instructs users to use the align-text: center command in order to center an image in an email.

 

Sooooo.....any thoughts? I think I'll just go ahead and submit this practicum and make a note when I submit it to the HS reviewers. I'm assuming based on my research that for whatever reason, converting images to a block is not allowed.

0 いいね!