• Resolved rg221187

    (@rg221187)


    This is probably super simple but just cant work it out. On my site i have place a HTML banner, using the html code i was provided, but i want to center it on page and its currently allign to left and cant work out how to center it, please take a look at it on my site:

    https://www.magicalbox.co.uk

    I think i need to tweak the script but im not very confident with script. The script for my home pgae currently reads as followed:

    <script type=”text/javascript”>// <![CDATA[
    var bannersnack_embed = {“hash”:”bcpi4iijo”,”width”:900,”height”:360,”t”:1458560114,”userId”:23126406,”type”:”html5″};
    // ]]></script>
    <script src=”//cdn.bannersnack.com/iframe/embed.js” type=”text/javascript”></script>
    <p style=”text-align: center;”><span style=”text-decoration: underline;”>Popular Products</span></p>
    <p style=”text-align: center;”>[featured_products per_page=”4″ columns=”4″ orderby=”date” order=”ASC”]</p>

    Please help me

Viewing 5 replies - 1 through 5 (of 5 total)
  • Your banner comes with this code:

    <a id="logo" href="https://magicalbox.co.uk/" title="">
    			    	<img scale="0" src="https://magicalbox.co.uk/wp-content/uploads/2016/03/Magical-Box-Logo-3-e1458217021282.png" alt="Magical Box">
    			    </a>

    Here’s my suggestion, that you edit your stylesheet so that the “id” has to be centered.

    See the idea ? You don’t edit your script calling the ecommerce solution. You edit the blog-wide rules dictating how items are to be displayed.

    Check this for instance: https://www.w3.org/Style/Examples/007/center.en.html
    Following this, you could try
    logo {
    margin-left: auto;
    margin-right: auto;
    }

    Add a text align center to the <p> tag wrapping the block of code script.

    <p style="text-align: center;">
    <script type="text/javascript">// <![CDATA[
    var bannersnack_embed =     {"hash":"bcpi4iijo","width":900,"height":360,"t":1458560114,"userId":23126406,"type":"ht  ml5"};
      // ]]></script><br>
      <script src="//cdn.bannersnack.com/iframe/embed.js" type="text/javascript"></script>    <iframe src="//cdn.bannersnack.com/banners/bcpi4iijo/embed/index.html?t=1458560114&userId=23126406" width="900" height="360" frameborder="0" allowtransparency="true" scrolling="no" allowfullscreen=""></iframe>
    </p>
    Thread Starter rg221187

    (@rg221187)

    Sorry i think you have got the wrong end of the stick on what im on about, im not talking about my log im talking about the purple html slider that is under the menu bar, sorry i may not of explained correctly

    Thread Starter rg221187

    (@rg221187)

    Thanks Bobby Gunawan that has done the trick perfect, thank you so much for your help

    You’re welcome.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do i center my HTML banner’ is closed to new replies.