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

XF 1.4 Responsive design conditional

reddy ink

Active member
#1
I would like tagline NOT show in responsive design in RM

Is this the conditional statement in resource_list_view

<xen:if is="@enableResponsive">
{$resource.tag_line}
</xen:if>
 

Brogan

XenForo moderator
Staff member
#2
Styles are either responsive or they aren't.
It's not something which is device dependent.

If a style is set as responsive then the responsive flag is true, otherwise not.

You can use media queries which are based on the device width - see the link in my signature for a guide.
 

reddy ink

Active member
#3
Thank you for the reply. I was looking for a conditional statement to hide some text when seen on mobile devices. Example: tagline on resource_index.
 

Arty

Well-known member
#5
Showing/hiding elements is done by using media queries. Conditional statement only checks if responsive design is enabled and hides media queries if it is disabled, it doesn't control anything other than that.

Add this to extra.css:
Code:
<xen:if is="@enableResponsive">
@media (max-width:@maxResponsiveWideWidth)
{
  .resourceInfo .tagLine { display: none; }
}
</xen:if>
 

Arty

Well-known member
#7
Probably some other rule is overriding it. Try adding !important to it
Code:
{ display: none !important; }