vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Center and size ad. (https://vborg.vbsupport.ru/showthread.php?t=304720)

SPEEDKILLZ 11-19-2013 04:23 AM

Center and size ad.
 
1 Attachment(s)
I am using a 250x250 ad in my sideblock. first is there a way to make it bigger like 300x300 because i dont see that option in adsence. Second i cannot get it to center in the block. I wrapped it with
Code:

<div align="center">
ad here
</div>

with no luck. Thanks for any help.

Spangle 11-19-2013 07:51 AM

Remove the <div>

And just try <center></center>

As to re-sizing it, check out the source code, the size will be specified in it somewhere, just alter it to your needs, you may need to scale it, so if you reduce the width by 20px to the same to the height to stop it looking stretched

SPEEDKILLZ 11-19-2013 08:42 PM

Thanks but that did not work either.

tbworld 11-20-2013 03:45 AM

I have already looked at this a little bit, and there are a few strange things. I am guessing you are installing this into a forum block. If so send the code you have installed in the forum block, so I can seperate it from the ad code.

Looking at the HTML/CSS on your page you seem to be setting the height and width of the iframe and externally on the div.

SPEEDKILLZ 11-20-2013 04:41 AM

Code:

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Sponsor -->
<ins class="adsbygoogle"
    style="display:inline-block;width:240px;height:240px"
    data-ad-client="ca-pub-9181553695854459"
    data-ad-slot="2036427109"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>


tbworld 11-20-2013 06:31 AM

This took me a bit to figure out. Your template CSS is structured incorrectly and this is really only a patch, that may or may-not work down the line.

Code:

/* Add this to the end of your "additional.css" template */
#sidebar_container .blockrow {
  padding: 10px 3px;
}


SPEEDKILLZ 11-20-2013 06:55 AM

Quote:

Originally Posted by tbworld (Post 2462267)
This took me a bit to figure out. Your template CSS is structured incorrectly and this is really only a patch, that may or may-not work down the line.

Code:

/* Add this to the end of your "additional.css" template */
#sidebar_container .blockrow {
  padding: 10px 3px;
}



Thank you :D, how did my scc get structured incorrectly? Able to tell that from the code i got from adsence?

tbworld 11-20-2013 06:59 AM

If that is a purchased template. Then the original CSS box model structure for the sidebar, is incorrect in that section. Hopefully, that patch will work without side-effects, until they fix their CSS code.

Google CSS box model structure.

SPEEDKILLZ 11-20-2013 07:03 AM

Thanks it did center the ad in the forum block. So is it as easy as to change your ad size in the code to make it a different size?

tbworld 11-20-2013 07:16 AM

Quote:

Originally Posted by SPEEDKILLZ (Post 2462271)
Able to tell that from the code i got from adsence?

I used your block code to eliminate any unknown from what my browser saw. Then I analyzed what was going wrong with the box model. Modern browsers have all sorts of tools to help in this area, that is why we always ask for a link where people have CSS/HTML problems.


All times are GMT. The time now is 02:20 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02304 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete