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

Quotes & Attachments Run Into The Advertisements In First Post

TheBigK

Well-known member
#1
I've created an ad-spot in every first post, right-aligned with the text; similar to the ad in first post in vBulletin.

The only issue I'm facing is that if the first post has a quote or attachment, then the quote/attachment container runs into the advertisements. Is there a CSS trick to adjust the size of the quote or attachment container dynamically so that they keep some margin with the advertisements?
 

Jake Bunce

XenForo moderator
Staff member
#3
What template code are you using for the ad? What ad template?

Or if you post a URL showing the problem then I can troubleshoot from there.
 

TheBigK

Well-known member
#4
What template code are you using for the ad? What ad template?

Or if you post a URL showing the problem then I can troubleshoot from there.
Thank you, Jake. I used following code in ad_message_body template -

Code:
<xen:hook name="ad_message_body" />
<xen:if is="{$post.position} == 0 AND !{$message.conversation_id}">
<div style="float: right; padding-left: 5px">
Ad content here
</div>
</xen:if>
It displays code right aligned with the text in first post. But when the first post has a 'quote', or 'attachment', then the quote holder or code holder (above) extends to the right-boundary, running into the advertisement. The normal text aligns well with the advertisement.

I don't have access to my test setup at the moment. Will try to upload screenshot in some time.
 

Jake Bunce

XenForo moderator
Staff member
#5
No problems here. It must be something with your style. Ideally I need to be able to load the web page so I can work with the problem. Is the test site online?
 

TheBigK

Well-known member
#6
No problems here. It must be something with your style. Ideally I need to be able to load the web page so I can work with the problem. Is the test site online?
Oh well, I've it on my localhost. I can put it live for some time, if needed. But here's a screenshot -

quote-runs-into-ad.png