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

Align in ad_header

lazer

Well-known member
#1
What's the easiest way to get this banner....

Untitled.png

...to align correctly, with the right amount of space at the top and bottom?

Thanks!
 

Jake Bunce

XenForo moderator
Staff member
#4
Admin CP -> Appearance -> Templates -> ad_header

Add this code:

Code:
<div style="float: right; background-color: red; width: 400px; height: 60px; margin-top: 20px; margin-bottom: 40px;">
	AD CODE HERE
</div>
Here is the result:

Screen shot 2012-12-15 at 5.29.35 PM.png

You can change the dimensions and margins as needed.

You may need to increase this setting to accommodate more vertical space in the header, otherwise you may notice that elements below the header are out of position:

Admin CP -> Appearance -> Style Properties -> Header and Navigation -> Height of Header Logo
 

lazer

Well-known member
#6
Ok, added this to ad_header:
Code:
<div style="float: right; background-color: blue; width: 400px; height: 60px; margin-top: 20px; margin-bottom: 40px;">
    <img src="http://dummyimage.com/468x60/000/fff" alt="Test Image" height="60" width="468">
</div>
but the banner sticks out to the right, widening the page:

template.png

Is there a way to bring it more over to the left?