dynamic css

  • Thread starter Thread starter Deleted member 10469
  • Start date Start date
D

Deleted member 10469

Guest
Extra.css

<xen:if is="{$xenOptions.XenCrea_Scroll_HeaderActive} AND {$xenOptions.XenCrea_Scroll_ImagePath} != null">
#header
{
@property "header";
background: url('{$XenCrea_Scroll_ImagePath}');
@property "/header";
}
<xen:else />
#header
{
@property "header";
background: none;
@property "/header";
}
</xen:if>

17epN.jpg


Hello, is it possible to dynamically set an element of a css code please?
 
Some conditionals work, some don't.

What I have done before now is used template conditionals in templates to load different CSS.

e.g.

<xen if is="{$xenOptions.something}">
<xen:require css="something.css" />
<xen:else />
<xen:require css="somethingElse.css" />
</xen:if>
 
This is not the problem,
background-image: url('{$xenOptions.XenCrea_Scroll_ImagePath}');

{$xenOptions.XenCrea_Scroll_ImagePath} is not converted/rewrited by the url of image :s
 
It's good :)

#header
{
background-image: url('{$xenOptions.XenCrea_Scroll_ImagePath}') !important;
}

@property "header"; is bug, it must do without.
 
Back
Top Bottom