Jump to content

[Share] Add a non-clickable text to top of header

Recommended Posts

If you can't make it work, you can send site url, I will check again.

#1. To add a non-clickable text to top of header, you can use this code to Custom CSS box

header#header:before {
    content: "Add something here";
    display: block;
    text-align: center;
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 10px;
}

image.png.7ce85c0720eda6d7622cf26b094aa417.png

Result

image.png.91f1736226b8987e12acb364f90f6b10.png

#2. To make this text appears on One Page only.

First, you need to find Page ID. Use below tool.

In my example, we will have: #collection-66aef2caff007776a825a948

image.png.292d46826f3a21b943c098b8bffbf8d9.png

Next, use this CSS code

body:not(#collection-66aef2caff007776a825a948) header#header:before {
	display: none !important;
}

#3. To make text appears on Mobile only, use this CSS code

@media screen and (min-width:768px) {
	header#header:before {
		display: none !important;
}
}

#4. To make text appears on Desktop Only, use this CSS code

@media screen and (max-width:767px) {
header#header:before {
		display: none !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
  • Replies 0
  • Views 711
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Posted Images

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.