Jump to content

How to Have a header Image for Desktop only (not mobile)

Recommended Posts

Site URL: http://www.illiya.com

I have created a header Image on a site I'm building but it doesn't work visually for mobile. We want there to be no image on threader for mobile. I can't figure out how to code that...

This is the CSS I have for the header image:

.header-announcement-bar-wrapper {background-image:url('https://static1.squarespace.com/static/5ff4e40cc4c1da1088b8f730/t/604130fcb6044c2b87b97450/1614885117065/Website+Banner.jpg'); background-repeat:no-repeat; 
   border-bottom: 10px solid #00A1DA !important; background-size:cover;background-position: center;} .header {background-color:rgba(0,0,0,0)!important}

 

Please and thank you for any help!

Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You can add media query to code run on desktop only

@media screen and (min-width:768px) {
.header-announcement-bar-wrapper {background-image:url('https://static1.squarespace.com/static/5ff4e40cc4c1da1088b8f730/t/604130fcb6044c2b87b97450/1614885117065/Website+Banner.jpg'); background-repeat:no-repeat; 
   border-bottom: 10px solid #00A1DA !important; background-size:cover;background-position: center;} .header {background-color:rgba(0,0,0,0)!important}
}

 

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.