Archived topic
Margin-bottom not applied
17 replies · Started by Jenny Dupuy on January 24, 2020
Hi there,
the bottom margin applies to H1 used within the content - use this CSS to apply it to the entry-title:
h1.entry-title {
margin-bottom: 50px;
}
Hi,
Ok but the page titles are also in the content. See the code below:
<div class="hfeed site grid-container container grid-parent">
<div class="site-content">
<div class="content-area grid-parent mobile-grid-100 grid-75 tablet-grid-75">
<main id="main" class="site-main">
<article id="post-559" class="post-559 page type-page status-publish" itemtype="https://schema.org/CreativeWork" itemscope>
<div class="inside-article">
<header class="entry-header">
<h1 class="entry-title" itemprop="headline">Test</h1> </header><!-- .entry-header -->
<div class="entry-content">
<h1>Other sample</h1>
<p>A paragraph with text, text, text and a lot of text.</p>
</div><!-- .entry-content -->
Normally h1 is reserved for page titles, and no other h1 should be put in the content.
Besides in the Gutenberg Heading block, the level h1 is not proposed in the list when adding a title.
So I'd expect the opposite: in the theme customization tool, I set the appearance of h1 as page title, and I put in additional css or child theme the customizations of other h1 tags. No?
Jenny
Hi Jenny,
You're definitely not wrong here. The reason we haven't implemented this is for backward-compatibility reasons. The theme was originally built having the H1 with zero margin, and margin-top being applied to the content. It's difficult to change this now without negatively affecting people who have customized it.
I'll give it some thought :)