Jump to content

Add Section above Navigation Bar

Go to solution Solved by whereisscott,

Recommended Posts

On 10/11/2023 at 11:03 PM, creedon said:

Please post the URL for a page on your site where we can see your issue.

A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site.

Please read the site-wide password and how to share a link documentation to understand how they work.

We can then take a look at your issue.

You may find How to post a forum question post useful.

Hi there - the site I am trying to do this for is www.themintocup.com on the homepage the black section that is currently the second section on the page - I would like to move it above the navigation.

Link to comment
On 10/31/2023 at 5:39 AM, collgrimes said:

Hi there - the site I am trying to do this for is www.themintocup.com on the homepage the black section that is currently the second section on the page - I would like to move it above the navigation.

I just do a same case, my approach is add a not linked page > add content there > then use plugin + some JS code to move not linked page content above header.

With your case, you can also use this code (Code Injection > Footer)

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  $(document).ready(function(){
    $('body.homepage header#header').insertAfter('body.homepage article section:first-child');
});
</script>
<style>
  body.homepage header#header {
    position: sticky !important;
    position: -webkit-sticky !important;
    top: 0 !important;
    background-color: white !important;
}
</style>

 

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...
On 11/11/2023 at 12:28 AM, collgrimes said:

@tuanphan this worked perfectly but the section is a it big. What would you add to fix the height of the section?

Big in height? I think you should able to edit section > adjust height? or add this code under

<style>
  article>section:first-child {
    padding-top: 0px !important;
}
</style>

image.thumb.png.cd36d4a278bf0ee9d0d7a81f74c34483.png

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

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.