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

XF 1.4 custom CSS styling syntax error, please help!

zoldos

Well-known member
#1
Trying to do this is a .css file. It keeps producing a syntax error. Please help!!

Code:
<xen:if is="{$attachment.extension} == 'mp3' ">
    .attachment
        {
            float: left;
            width: 100%;
            max-width: 100%;
        }
           
        <xen:elseif is="{$attachment.extension} == 'mp4' ">
          .attachment
        {
            float: left;
            width: 100%;
            max-width: 100%;
        }
    <xen:else />
        .attachment
        {
            float: left;
            width: 200px;
            max-width: 100%;
        }        
    </xen:if>
 

TJA

Well-known member
#2
Just a guess :)

Code:
<xen:if is="{$attachment.extension} == 'mp3' ">
    .attachment
        {
            float: left;
            width: 100%;
            max-width: 100%;
        }
       
    <xen:else />
        .attachment
        {
            float: left;
            width: 200px;
            max-width: 100%;
        }       
</xen:if> 
          
<xen:if is="{$attachment.extension} == 'mp4' ">
          .attachment
        {
            float: left;
            width: 100%;
            max-width: 100%;
        }
    <xen:else />
        .attachment
        {
            float: left;
            width: 200px;
            max-width: 100%;
        }       
</xen:if>
 

zoldos

Well-known member
#4
It's just not wanting to recognize the difference between the two extensions and keeps defaulting to the original code. I even tried an internal style sheet to override the linked one and it still doesn't work. Very strange! lol