Jump to content

How do i move the navigation bar below the first section/banner?

Recommended Posts

Site URL: https://www.davai.squarespace.com

Hi

I am wondering how i move the navigation bar below the first section/banner. I have seen this done on many websites, including ones, made with squarespace, although they could be done on version 7.0.

 

The website, on which i want to add this effect is davai.squarespace.com (password: davai) The effect has been achieved on our current website (davai.dk) for reference, but that is running on wordpress. Another example is https://harlow.showit.site/

I am sure this question has been raised before, but i have not been able to find a solution.

Once the navigation bar is removed from the first section/banner, i want it to be fixed.

The first section/banner should still have company logo in top left corner.

 

I have added an attachment of a video, where the effect is showcased.

Link to comment
  • 2 months later...
  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...
  • 1 year later...
On 8/13/2022 at 1:30 AM, kathrynbethard said:

Can you show how this can be done with CSS on a site using the Brine template?

If you share site url, we can check easier

If you use 7.1 code, you can use this script code (Code Injection > Footer)

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://d1j8mu9lowy9zf.cloudfront.net/twcsl/0.2.2/twcsl.js"></script>
<script>
document.addEventListener("DOMContentLoaded",function() {
    const header = document.getElementById('header');
    const firstSection = document.querySelector('.page-section:first-child');
    firstSection.after(header);
});

</script>
<style>

@media screen and (min-width: 768px) {
#header {
  position: sticky;
  top: 0;
  display: none;
}
main .page-section:first-child + #header {
  display: block;
}
main .page-section:first-child {
  min-height: calc(100vh - 93px)!important;
}
}

</style>

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 5 months later...
On 1/30/2023 at 1:32 AM, pexeldio said:

yes that code work but one issue there is , content appear on the top, check screenshotimage.thumb.png.e12212785f3b6f525ad3ff335988a7bc.png

What is site url? We can check problem easier

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.