Jump to content

CSS to centre quiz

Go to solution Solved by Michelle777,

Recommended Posts

  • Replies 9
  • Views 929
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Posted

Try wrapping the entire iFrame code inside <center> tags, a bit like this:

<center> 
   <iframe>
</center> 

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

Hi there I don't think that's working but I might not be using it correctly. 

I've tried pasting that code directly into CSS.

I've also tried incorporating the #block code within it.

Both times it gives me a syntax error.

Could you tell me exactly how to direct that CSS to the quiz code block?

Thank you!

Posted
2 minutes ago, Michelle777 said:

I've tried pasting that code directly into CSS.

The code wasn't CSS, it was HTML to be incorporated into the code block. Since I don't have the embed code, I can't give you the entire thing, but place this before the <iframe> code:

<center>

and this after:

</center>

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted (edited)

Hi, it won't let me use iframe code as I'm still in trial mode, so I tried it in my other site where I have upgraded features.  And in there it looks really weird, which is a another problem 😕

The code is this:

<iframe id="interactApp6658d6e0706600001596e725" width="800" height="800" style="border:none;max-width:100%;margin:0;" allowTransparency="true" frameborder="0" src="https://quiz.tryinteract.com/#/6658d6e0706600001596e725?method=iframe"></iframe>

 

Edited by Michelle777
Posted (edited)
29 minutes ago, Ziggy said:

The code wasn't CSS, it was HTML to be incorporated into the code block. Since I don't have the embed code, I can't give you the entire thing, but place this before the <iframe> code:

<center>

and this after:

</center>

 

<center>
  
<iframe id="interactApp6658d6e0706600001596e725" width="800" height="800" style="border:none;max-width:100%;margin:0;" allowTransparency="true" frameborder="0" src="https://quiz.tryinteract.com/#/6658d6e0706600001596e725?method=iframe"></iframe>

</center>

 

In trial mode you can use any of the advanced features, it's only when you upgrade to the Personal plan that some features are disabled.

Edited by Ziggy

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

You should be able to reduce it by pulling the block up. If you can't do that because of the code warning message, you can add this to Custom CSS which will hide it and then allow you to shorten the block:

html.squarespace-damask .sqs-blockStatus, .sqs-block .removed-script {
  display: none !important;
}

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

  • Solution
Posted

For anyone else looking for a simple solution to this... use the Javascript instructions in Interact instead of the iframe code.  Use an Embed block instead of a code block.  And make the Embed code nearly as wide as the page.  🙂

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.