• There is a white line that appears separating the header from the body content. When I’m logged into the site and editing there is no white line separating the two groups.

    Is it not possible to have this theme have a colored menu and a section right under that’s the same color?

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • In your page template(s) you should be able to give the main group block zero top margin. This will remove the spacing between the header and the main group which contains the page content.

    Group > Dimensions (toggle margin control on) > Margin > 0px (top margin)

    Thread Starter David

    (@arkain)

    Doesn’t work because all margins are at 0px already. Again, in the editor there is no white line. But on the live site there is – so it’s hard coded into the site.

    I guess this is just an annoying limitation of this theme. It I set the site background to colored it fixes the problem. But then literally every page is then colored, even blog posts.

    It will work if you explicitly enter 0 for the top margin, rather than leave the margin control empty.

    A bit of background information to help explain this.
    In a block theme everything is a block; the header, the main group block containing the page content, individual blocks within the page content, headings, paragraphs, images etc.
    WordPress uses a blockGap variable, and this is applied to provide spacing between blocks. Most of the time this is visually better (or it was decided by those building WordPress to be better) than having no visible space between blocks.

    In your case it would be better to not have any spacing between the header and the page content, so this can be overridden for the main group block containing the page content by setting the top margin to 0 for the main group block in the page template(s).
    If you leave the margin setting empty, the top margin will effectively default to the blockGap variable which is 1.5rem in the Twenty Twenty-Two theme.
    This affects all block themes, and each theme can define what the blockGap should be.

    There does seem to be an issue with the space only appearing in the live site and not in the editor. They should be identical but that is another issue.

    Hope this helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Magical White Line’ is closed to new replies.