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

Left side padding in advert using ad_message_body

Discussion in 'Troubleshooting and Problems' started by CyclingTribe, Jun 21, 2013.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    CSS is not my forte - I'm trying to add some space / padding between the left side of the advert and the quote / message text (as indicated by the yellow marker):


    At the moment the advertisement sits on top of the quote - I'd like it to 'push' the quote box over to the left so there's a distinct gap between the two.

    Template code I've cobbled together so far is:

    <xen:hook name="ad_message_body" />
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 1 AND {$thread.reply_count} > 0 AND !{$visitor.user_id}">
    <div style="background: #fafafa; float: right; padding: 10px; border: 1px solid #d7d7d7; border-radius: 6px;">
    <div align="center">
    Any help appreciated. (y)

    Shaun :D
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. CyclingTribe

    CyclingTribe Well-Known Member

  4. Brogan

    Brogan XenForo Moderator Staff Member

    Try adding margin-left to the advert CSS.
  5. CyclingTribe

    CyclingTribe Well-Known Member

    Thanks - that seems to work for the body text, but doesn't push the quote container to the left:

  6. Brogan

    Brogan XenForo Moderator Staff Member

    Can you post a URL so I can check?

    I seem to recall looking into this before for someone else.

    It works on my site so it is possible.
    I just use this: <div style="min-height: 250px; margin-left: 8px; float: right">
  7. CyclingTribe

    CyclingTribe Well-Known Member

  8. Brogan

    Brogan XenForo Moderator Staff Member

    The reason it works on my site is I have this in EXTRA.css:

    .bbCodeQuote {
    max-height: 124px;
    overflow: auto;

    That is now an element in Style Properties in 1.2 so setting a max height there along with overflow-auto should resolve it.

    Or you can just add overflow-auto and that will keep quotes at their maximum height.
    Jake Bunce and CyclingTribe like this.
  9. Mike

    Mike XenForo Developer Staff Member

    It's probably the overflow that triggers it specifically.
  10. CyclingTribe

    CyclingTribe Well-Known Member

    Perfect - thanks a lot guys. (y)

    Added overflow: auto; to the Miscellaneous box for @BBCodeQuote and that's done the trick:

  11. akia

    akia Well-Known Member

    I've found also adding:
    .attachedFiles {
    overflow: auto;
    to extra.css also solves the same problem but with the attached images box.

Share This Page