Jump to content

Embedding code onto an image

Recommended Posts

Posted

Hi there, I'm trying to add a widget onto an image and am wondering if this is possible via code.  I am also not currently even able to embed the widget...

which is the following from a reservations company:

                    <link rel="stylesheet" type="text/css" href="https://onsass.designmynight.com/?background-color=%23fffccb&primary-color=%23fffccb&body-text-color=%23f8cbe4&outer-border-color=gray"><script src="//widgets.designmynight.com/bookings-partner.min.js" dmn-booking-form="true" venue="66b37bdce26b763527072e0a" hide-offers="true" hide-powered-by="false" search-venues="false" monday-first="true" locale="undefined"></script>
               

thanks very much

  • Replies 5
  • Views 914
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 weeks later...
Posted

Hi Tuan, Thank you so much - apologies for delay. I've embedded the code but still can't work out how I would hover it as the way I'm currently embedding the widget is through code on the page as I don't want it on every page so it's not in an image as it were but it's own block. Thanks

Posted

You can use this code to Website Tools > Code Injection > Footer.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $('#block-yui_3_17_2_1_1727202079275_3745').appendTo('#block-yui_3_17_2_1_1727210333921_2493 figcaption');
});
</script>
<style>
  #block-yui_3_17_2_1_1727210333921_2493 figcaption {
    display: flex;
    flex-direction: column;
}

div#dmn-partner-widget {
    max-width: 100% !important;
    width: 350px !important;
}
</style>

Do you have a large image version?

image.thumb.png.4159d4b2603e6ddd0bc9bf138f7be320.png

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!)

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.