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

dynamic css

Discussion in 'XenForo Development Discussions' started by Zephyr, Sep 21, 2012.

  1. Zephyr

    Zephyr Well-Known Member



    Hello, is it possible to dynamically set an element of a css code please?
  2. Chris D

    Chris D XenForo Developer Staff Member

    Some conditionals work, some don't.

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


    <xen if is="{$xenOptions.something}">
    <xen:require css="something.css" />
    <xen:else />
    <xen:require css="somethingElse.css" />
  3. Zephyr

    Zephyr Well-Known Member

    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
  4. Zephyr

    Zephyr Well-Known Member

    It's good :)

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

    @property "header"; is bug, it must do without.
    Chris D likes this.

Share This Page