1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 How to make a rotating banner box responsive

Discussion in 'Styling and Customization Questions' started by wardsweb, Jun 10, 2015.

  1. wardsweb

    wardsweb Member

    I have a program that rotates banners. Can I put this script into a table and make the table responsive or is there another way to make this script resize? Here is the script:

    Code:
    <script language='JavaScript' type='text/javascript'>
                <!--
                       if (!document.phpAds_used) document.phpAds_used = ',';
                       phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
      
                       document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
                       document.write ("http://www.audiokarma.org/ads/adjs.php?n=" + phpAds_random);
                       document.write ("&amp;what=zone:1");
                       document.write ("&amp;exclude=" + document.phpAds_used);
                       if (document.referrer)
                          document.write ("&amp;referer=" + escape(document.referrer));
                       document.write ("'><" + "/script>");
                    //-->
                </script>
     
    Last edited: Jun 10, 2015
  2. wardsweb

    wardsweb Member

    A lot of views but no answers or even questions. Is this not possible, the post header isn't phrased correctly or is this the wrong forum?
     
  3. wardsweb

    wardsweb Member

    Is it possible to add a width and height parameter to the above code? I could then use two separate scripts for the different sizes.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    The ad provider will need to update their code to make it responsive.
     
  5. Dylan V

    Dylan V Well-Known Member

    You can do this without JavaScript. It is possible to do this with CSS, but I need more info on what you want to do exactly.
     
  6. wardsweb

    wardsweb Member

    PM sent - Thanks
     
  7. asma

    asma Member

    can u please share the result coding here? :)
    thank u
     
  8. wardsweb

    wardsweb Member

    No resolution has been found yet. Hoping Dylan can come up with something that will resize this just like putting banners in the sidebar are automatically resized.
     
  9. Dylan V

    Dylan V Well-Known Member

    Hi,

    Can you give me a live preview?
     
  10. wardsweb

    wardsweb Member

    Hi Dylan,

    My apologies for the massive delay but the new site is now up and running. http://audiokarma.org/forums/
    I need to scale the banner just below where it says "Audiokarma Home Audio Stereo Discussion Forums"
    It is 468x60 and I need to scale smaller for phones.
     

Share This Page