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

All Posts 'Justified' by Default?:

QenTox

Well-known member
#7
You can try using the node ID in the CSS, e.g. .node 22 .message .messageText
.node22 without space did the job, thanks for this, you even guessed the right node number :ROFLMAO:

Now this might be tricky... As it is an article I only need to justify the first (OP) post in the thread. Is is possible to do that or that is too much I ask for?
 

Brogan

XenForo moderator
Staff member
#8
Oops, that was a typo on my behalf - I'll edit the post to avoid confusion.

Unfortunately you can't use a post conditional in the CSS templates.
 

Brogan

XenForo moderator
Staff member
#10
If you were determined to do it though you could edit the message template adding inline styling, like so:
HTML:
<xen:hook name="message_content" params="{xen:array 'message={$message}'}">
<xen:if is="{$post.position} == 0">
<div class="messageContent" style="text-align: justify">       
    <article>
        <blockquote class="messageText ugc baseHtml{xen:if $message.isIgnored, ' ignored'}">
            <xen:include template="ad_message_body" />
            {xen:raw $message.messageHtml}
        </blockquote>
    </article>
   
    {xen:raw $messageContentAfterTemplate}
</div>
<xen:else />
<div class="messageContent">       
    <article>
        <blockquote class="messageText ugc baseHtml{xen:if $message.isIgnored, ' ignored'}">
            <xen:include template="ad_message_body" />
            {xen:raw $message.messageHtml}
        </blockquote>
    </article>
   
    {xen:raw $messageContentAfterTemplate}
</div>
</xen:if>
</xen:hook>
 

QenTox

Well-known member
#11
This is what I need! EXTRA.css code deleted, this one added to message template and it works just great. Thanks a lot again for your help! (y)