Jump to content

Header Code Injection Adding Extra Padding

Recommended Posts

Site URL: https://theaboutherpodcast.squarespace.com/

Hi there! 

When I add a simple <div> tag to my header code, I'm getting some extra padding added to all my pages. When I remove the code, the padding is not there. It only happens in the first container/section on the page. Any thoughts? Here's my code I injected in the header:

<div class="logo-title-container">
  <div class="logo-title">
 <a href="/home"><h1>
   Abigail O’Neel
</h1>
<h4>
  <em>ministry wife, podcast host, &amp; bible teacher</em>
   </h4></a>
  </div>
    </div>

 

Link to comment

Your code is invalid. Try this new code

<div class="logo-title-container">
  <div class="logo-title">
    <h1><a href="/home">Abigail O’Neel</a></h1>
    <h4><em>ministry wife, podcast host, &amp; bible teacher</em></h4>
  </div>
</div>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 year later...

Hi hope this is the right place to post this

I added this code into the universal custom css to remove header height for aesthetic purposes. See first image for reference. 

Quote

.page-section:nth-child(1) {padding-top:0!important}

image.thumb.png.9457de4f4fb197b272af0f64ec82bc59.png

https://thomsonscooterclub.com/

However, for one specific page, i do not want this change to apply. Is there anyway i can add a code into that specific page's Page Header Code Injection to prevent this? Below is a picture of the said page:

image.thumb.png.558ecef7f2b0af2216a6cc196eb169c6.pnghttps://thomsonscooterclub.com/shop

 

Link to comment
15 hours ago, mmyeah said:

Hi hope this is the right place to post this

I added this code into the universal custom css to remove header height for aesthetic purposes. See first image for reference. 

image.thumb.png.9457de4f4fb197b272af0f64ec82bc59.png

https://thomsonscooterclub.com/

However, for one specific page, i do not want this change to apply. Is there anyway i can add a code into that specific page's Page Header Code Injection to prevent this? Below is a picture of the said page:

image.thumb.png.558ecef7f2b0af2216a6cc196eb169c6.pnghttps://thomsonscooterclub.com/shop

 

Change your code

.page-section:nth-child(1) {
    padding-top: 0 !important;
}

to this

body:not([class*="type-products"]) .page-section:nth-child(1) {
    padding-top: 0 !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.