Jump to content

How do I center a Code block?

Recommended Posts

Hi. I've used some embed code from a countdown clock widget. However, I would like it centered on the page, but I don't know how. The embed code I have used is:

<object width="313" height="109">
 <param name="movie" value="https://d1owebpsm4lcev.cloudfront.net/w/_003.swf"/>
 <param name="flashvars" value="eid=185034"/>
 <param name="wmode" value="transparent"/>
 <param name="allowScriptAccess" value="always" />
 <embed src="https://d1owebpsm4lcev.cloudfront.net/w/_003.swf"
        type="application/x-shockwave-flash" allowScriptAccess="always"
        width="313" height="109"
        flashvars="eid=185034" wmode="transparent"/>

Thanks for any help.

Link to comment
  • 1 month later...
  • Replies 9
  • Views 43.2k
  • Created
  • Last Reply
  • 11 months later...


When i add the above code to my Custom CSS it gives me a Syntax error? I am using Hayden theme and on the home page you can see under Quick Select that MOst Popular link is left aligned. I want this code block to be centralized.


Link to comment
  • 1 month later...
  • 3 months later...
  • 4 weeks later...

@astarkOn my site I needed to embed an Apple Music Badge linking to Artist page... In the embed block:

Click the </> symbol to the right of the text field (where you'd paste in your embed code. It'll open a blank text editor window. In there I pasted the embed code and modified with tags wrapping--see below.

<a href="https://some.link-goes-here" style="display:inline-block;overflow:hidden;background:url(/assets/shared/badges/en-us/music-lrg.svg) no-repeat;width:115px;height:40px;"></a>

Link to comment
  • 5 weeks later...
  • 1 month later...
  • 1 year later...
  • 10 months later...


This topic is now archived and is closed to further replies.

This topic is now closed to further replies.

  • 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.