Changing alignment of embedded shortcode content on Papermod

Hi there I am having some trouble aligning an embedded newsletter signup to the center of the page. I have created a shortcode:

<div id="custom-substack-embed"></div>

  window.CustomSubstackWidget = {
    substackUrl: "",
    placeholder: "",
    buttonText: "Subscribe Now",
    theme: "custom",
    colors: {
      primary: "#000000",
      input: "#3E3E3E",
      email: "#00D97E",
      text: "#F4F4F4",

    // Go to to unlock custom redirect

<script src="" async></script>

and I am using this to imbed the signup form in the content:

{{< substackiframe src="" >}}

How can I change the alignment of the embedded newsletter signup so that it is centered?

Many thanks in advance!

I managed to align the embedded content by changing the first line to this:

<div style="text-align: center" id="custom-substack-embed"></div>

Why not put that in an external CSS file? Olive styles are a maintenance nightmare.

What do you mean by that? I am very new to HUGO and coding in general.

You might want to read about the relationship between CSS and HTML, for example at the. Mozilla Developer Network. This has nothing to do with Hugo, it is about the architecture of web documents.

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