Jump to content

What does this injected code mean?

Recommended Posts

Hi- So my individual portfolio pages started acting weird in mobile view (see attached screenshot).

I did add some very simple custom CSS and a script to my site via the Custom CSS (Design>Custom CSS) and Code Injection (Setting>Advanced>Code Injection), but while I was troubleshooting, removing all those things did not fix my situation seen in the photo.

I was advised by squarespace to go further and delete the code found below from each of my individual portfolio pages page header code Injection panel. This has seemed to resolve my issue. 

Could someone smarter than I describe what this code below is meant to do? I'm just nervous I'm creating other issues by deleting this code. Also,  I swear I did not insert that code into the page header code injection panel for each of these pages-- do you think it was automatically generated via some of my other code/scripts? 

Thanks!

.gallery-slideshow-item img {
    width: 100% !important;
    height: auto !important;
    top: 0 !important;
    left: 0 !important;
}
.gallery-slideshow {
    width: 50%;
    float: left;
    padding: 0;
    padding-left: 3vw;
    margin-bottom: 30px;
    height: auto !important;
}
.gallery-slideshow-controls {
    top: 55% !important;
}
@media screen and (max-width: 768px) {
 .gallery-slideshow {
      width: 100%;
     padding-left: 6vw;
     padding-right: 6vw;
  }
}

 

645449de-3514-47da-ae56-a7e3c0cdd171.thumb.jpg.7e9018ef03f42e24458845a7b7483f03.jpg

Link to comment
  • Replies 1
  • Views 176
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi. To add code to Code Injection or Page Header, you need to wrap CSS in style tag

<style>
  .gallery-slideshow-item img {
    width: 100% !important;
    height: auto !important;
    top: 0 !important;
    left: 0 !important;
}
.gallery-slideshow {
    width: 50%;
    float: left;
    padding: 0;
    padding-left: 3vw;
    margin-bottom: 30px;
    height: auto !important;
}
.gallery-slideshow-controls {
    top: 55% !important;
}
@media screen and (max-width: 768px) {
 .gallery-slideshow {
      width: 100%;
     padding-left: 6vw;
     padding-right: 6vw;
  }
}
</style>

 

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

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.