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

Changing element width based on post position

Discussion in 'Styling and Customization Questions' started by speedway, May 21, 2013.

  1. speedway

    speedway Well-Known Member

    Hi all

    I am just working on replacing my theme and have come across a small issue with in post adverts. I am using code to place an advert into the first post on the page, that works fine. However, if there is a quote in that post the advert will overlay it.

    Is there a way to dynamically assign a width to the quote block when it appears in a certain post position, something like

    if post # = 0
    set style width for quote to 75%
    do nothing
    end if
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> EXTRA.css

    .messageList li:first-child .bbCodeQuote
    	width: 75%;
    HWS likes this.
  3. speedway

    speedway Well-Known Member

    Thanks Jake

    That doesn't quite do what I want. I was wanting to only change that width if there was an advert showing in the post. I think I may have found the answer while looking at another skin, using the xen:set command might work. Haven't tried it yet so pure speculation on my part :)
  4. EQnoble

    EQnoble Well-Known Member

    If you post up a link to a thread with a first post advert and a quote I will take a look and see if I can come up with a solution

Share This Page