Jump to content

turn off styling for a single block

Go to solution Solved by creedon,

Recommended Posts

I'm trying to restrict my site styling from adjusting the header from a custom calendar form being placed into my site. All the code is working fine, but the header that is brought in is getting my site's font/padding/etc and I want to turn that off just for this block. Any suggestions?

Link to comment
  • Replies 4
  • Views 761
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Please post the URL for a page on your site where we can see your issue. For us to see the URL you need to include the link in the content of your post. The URL field the forum software provides is not shown to us.

A link to the backend of the your site won’t work for us, i.e. a URL that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site.

Please read the site-wide password and how to share a link documentation to understand how they work.

You may find How to post a forum question post useful.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • Solution

The issue is that the embedded code has defined a class of .header but doesn't have any CSS for it. Squarespace does have declarations for that class and so the embedded code is picking up styles from Squarespace. This is basically what you described.

Without going into details the cleanest way I can see to solve the issue is add the following to a code block.

<iframe srcdoc="

  <div id=&quot;geotix-widget-container&quot;>
  
    </div>
    
  <script src=&quot;https://d1wcopahj6rhb7.cloudfront.net/events/prd/geotix-embed-latest.js&quot;>
  
    </script>
    
  <script type=&quot;text/javascript&quot;>
  
    // CSS Override Documentation
    // https://s3.amazonaws.com/geotix-widgets/events/css-customizations.md

    GeotixWidget.fetchTickets (

      {
      
        token : 'e4a16f02280cdf1ee211ade00d4eaeee',
        
        container : 'geotix-widget-container',
        
        portalId : 102
        
        }
        
      );
      
    </script>
    
    "
    
    style="border : unset; height : 100vh; width : 100%;"
    
    >
    
 </iframe>

Using an iframe tag isolates Squarespace from the geotix code. Using an iframe can have it's own challenges but in this case I think the downside is less problematic than other approaches that might be used.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.