Jump to content

CSS to Remove Nav Bar White Space

Recommended Posts

Hi!

a client of mine is looking to add this banner above the menu. 

I found CSS that works well. The only downfall is that now there is a space under the nav bar that I cannot reduce. This space is always the same size as the navigation bar. It's as if the white space is where my actual navigation bar should be, but the coding I am using visibly places the bar right above the allotted space. How can I reduce this white space without reducing the size of the navigation bar?

Worth mentioning, the space has nothing to do with the section below. When the codes are removed, the space is gone. 

Here is the coding I have:

 

/* Add sticky header */

header#header {

    position: sticky !important;

  top: 0px;

}

 

/* Add a banner */

body.homepage div#siteWrapper:before {

    content: "";

    background-image: url(https://static1.squarespace.com/static/6470f3f123aef000b21163ab/t/64768ec0b19c39685933aaef/1685491392647/no+logo%404x.png);

    background-size: cover;

    background-repeat: no-repeat;

    background-position: bottom;

    display: block;

    width: 100%;

    height: 320px;

}

 

Screen Shot 2023-05-30 at 7.18.46 PM.png

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.