Changing element width based on post position


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

Jake Bunce

XenForo moderator
Staff member
Admin CP -> Appearance -> Templates -> EXTRA.css

.messageList li:first-child .bbCodeQuote
	width: 75%;
  • Like
Reactions: HWS


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 :)


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