XF 1.4 Need help making this Background .css code fit on one page only.

oO5 Dynasty

Well-known member
Code:
/* START - Background image on forum */
html {
background: url(/@imagePath/xenforo/background/your_image.jpg) !important;
background-attachment: fixed !important;
background-size: cover !important;
}
/* END - Background image on forum */

trying to make this background show on one page only. The form_List page
 
Last edited:
Hello,

You can apply this directly by implanting a condition in the html tag in the "PAGE_CONTAINER" template. Replace this:
Code:
<html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Public NoJs {xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'} {xen:if {$sidebar}, 'Sidebar', 'NoSidebar'} {xen:if $hasAutoDeferred, RunDeferred} {xen:if $isResponsive, Responsive, NoResponsive}" xmlns:fb="http://www.facebook.com/2008/fbml">

With:
Code:
<html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Public NoJs {xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'} {xen:if {$sidebar}, 'Sidebar', 'NoSidebar'} {xen:if $hasAutoDeferred, RunDeferred} {xen:if $isResponsive, Responsive, NoResponsive}" xmlns:fb="http://www.facebook.com/2008/fbml" <xen:if is="{$contentTemplate} == 'forum_list'">style="background-color: #000000;"</xen:if>>

Change "background-color: #000000" with what you want.
 
Top Bottom