• Hi,
    I’d need some help with what seems some weird behaviour in the block editor.
    I wrote the post linked below, and the last block (in violet) a the bottom of the post should be displayed centered and in “normal” font-weight, instead it is shown as justified and in bold. Cannot understand why.
    By checking with the Firefox inspector I can see that the p tag <p class=”has-text-align-center”> has a class that should actually make the text centered, but for some reason this doesn’t happen.
    Any idea about what may be causing this and how can I have this text displayed as centered and in normal font-weight?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • @sinergyinaction

    In your style sheet you have:

    .has-text-align-center {
     text-align: center;
    }

    But you also have:

    .blog-main p {
     text-align: justify;
    }

    And this second part is overriding the centring. You can try amending the stylesheet as follows:

    .has-text-align-center {
     text-align: center !important;
    }
    Thread Starter sinergyinaction

    (@sinergyinaction)

    Thanks Mattyrob
    I am not sure where in the stylesheet should I try this. My posts editor, has a right-hand-side column (in the gutemberg blocks editor) with an ‘Advanced’ section
    named Class(es), Additional CSS and a text box (That originally had the ‘.has-text-align-center’ class name in it).
    I substituted the css suggested by you there, but nothing happens. Wonder if this is not the right place to do this.

    aI had Also, noticed about the

    .blog-main p {
     text-align: justify;
    }

    CSS, but it looks like a higher level bit of CSS that probably applies to any text and any page in this website, like a default. I thought that by specifying a lower level command would replace the default behaviour.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Content centered in block but not in actual published post’ is closed to new replies.