Results 1 to 3 of 3

Thread: Javascript ad code won't align

  1. #1
    Join Date
    Oct 2006
    Ables Springs, Texas

    Javascript ad code won't align

    I have tried everything I can think of to align javascript ad code provided by several Ad Networks (7Search, Clicksor, AdOnion) but no luck. However, Adsense ad code responds as desired. Reference http://www.tax-savings-depot.com/library/.

    You will observe a 7Search banner and an Adsense link ad at the top of the page. Both are in the same div:
    <div style="text-align: center;">
    notice the Adsense ad aligns, but the 7Search banner does not. I've tried using clear, position, using two divs (one for alignment, the other as a code container), and separating the two ad codes into their own div, but no luck. The 7Search banner just will not respond. I've even tried adding the styling to the ad code itself, but still no luck.

    Here's the 7Search ad code:
    				SevenSearchDisplayAds_layer_banner = false;
    				SevenSearchDisplayAds_mobile_redirect = false;
    				SevenSearchDisplayAds_max_dim = "0x0";
    				//default banner house ad url 
    				SevenSearchDisplayAds_default_url = '';
    				SevenSearchDisplayAds_banner_border = ''; 
    				SevenSearchDisplayAds_banner_ad_bg = '';
    				SevenSearchDisplayAds_banner_link_color = ''; 
    				SevenSearchDisplayAds_banner_text_color = '';
    				SevenSearchDisplayAds_banner_text_banner = false; 
    				SevenSearchDisplayAds_banner_image_banner = true; 
    				SevenSearchDisplayAds_network_logo = false; 
    				SevenSearchDisplayAds_post_click_url = '';
    				<script src="http://adserving.7SearchDisplayAds.com/showAd.php?nid=1101&amp;pid=582&amp;adtype=1&amp;sid=1490">
    If you scroll to the bottom of the page, you will observe an Adsense banner. Notice it also responds to CSS and is aligned as desired. So, why won't the other ad codes align?
    Last edited by jwgrafflin; 04-11-2014 at 12:10 AM. Reason: Forgot something

  2. #2
    Join Date
    Mar 2011
    The HTML generated by the 7Search ad creates (among many, many other things) an <iframe> which displays the ad. So you'll need to find how to create a CSS selector that will control this <iframe>. All I can see to use (at a glance) is:
     .col1 iframe[width=728] { margin:0 auto; }
    which I wouldn't guarantee will work. Maybe their documentation has some advice about styling or at least contains some information that will give you a better identifier.
    Rick Trethewey
    Rainbo Design

  3. #3
    Join Date
    Oct 2006
    Ables Springs, Texas
    Thanks, Rick. That's more than I've been able to get from 7Search. My inquiry went in to them on Monday, and still no response (which tells me I need to use a different ad network). I'll try your suggestion, and if that doesn't work, it's time to move on.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center