Jump to content

Header: create bottom border with white space below

Recommended Posts

Site URL: http://bia-dev.squarespace.com

Using 7.1, I would like to style the bottom of the header to include a 3px horizontal line above 10px of white space. I’ve created a horizontal line using: 

header#header {border-bottom: 3px solid #821923;}

I can’t, however, seem to trigger anything to generate white space below. 

The development site is bia-dev.squarespace.com. The attached image illustrates what I’m trying to achieve. (Also want to lower the horizontal nav per the image, but that’s another topic.) 

Thank you. 

IMG_3711 2.jpg

Link to comment
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Remove code you used and add this to Home > Design > Custom CSS

header#header:after {
    content: "";
    background: red;
    display: block;
    width: 100%;
    height: 3px;
    position: absolute;
    bottom: 10px;
    z-index: 999;
}

 

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

Thank you tuanphan.  Custom CSS now contains your provided code above and mine has been removed. At first it appeared not working, but then checked on a couple iOS devices (all good), then logged out of Squarespace on the desktop, and it does appear to be working there too. 

Edited by SuanMokkhBKK
Updated result
Link to comment
9 hours ago, SuanMokkhBKK said:

Thank you tuanphan.  Custom CSS now contains your provided code above and mine has been removed. At first it appeared not working, but then checked on a couple iOS devices (all good), then logged out of Squarespace on the desktop, and it does appear to be working there too. 

So is it working now?

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

tuanphan -- Yes. It does appear to be working just fine in the wild on the few devices/browsers I've checked so far.  Now if one is actually logged into the site on Squarespace, however, the line appears briefly on refresh, then a flash of the line's color across the header, then the line disappears, but I can certainly live with that.  Thank you again. 

Edited by SuanMokkhBKK
spelling
Link to comment
On 5/20/2020 at 8:32 PM, tuanphan said:

So is it working now?

Yes, but? Can the z-index of the navigation folder content be changed so the horizontal line does to pass over the drop-down menu content -- allow the nav folder background color and nav content to cover up the new horizontal line. I dropped the z-index for the red line as low as it would go and still be visible (z-index: 3;) and  tried targeting the .header-nav-folder-content and .header-nav-folder-wrapper, with a higher z-index but neither of these pushed the red line behind the content. 

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.