Announcement

Collapse
No announcement yet.

Using Variables in CSS file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using Variables in CSS file

    Dear Actinauts,

    I am new to Actinic so forgive the dumb questions! So far so good and I can see that I will like this product . I have an image that I am applying to my background, it is defined in the the CSS file like this:
    body {
    text-align:center;
    background: url("FuzzyDiamond.jpg" />") repeat-x;
    position:relative;
    background-position: 0px 350px;
    }

    This works fine but I want to use a variable so that it can easily be changed so I did this:
    body {
    text-align:center;
    background: url("<actinic:variable name="TOR_BackgroundStripe" />") repeat-x;
    position:relative;
    background-position: 0px 350px;
    }

    I can't make this work but don't know why. The variable type is filename and I have set both values to FuzzyDiamond.jpg. What have I missed?

    Once I have made this work I want to have a list of choices, I know how to do this but my question is this, if my list is made up or file names do I need to format them in any way in the list? And, if my images are in a folder what is the correct format when entering the list values?

    many thanks........................ liz

    #2
    Welcome to the Community Liz.

    What you're doing should work.

    Look at the generated actinic.css on your server and tell us what appears there.

    If site isn't live you'll find a generated file in PreviewHTML.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      There's already a BG image variable used in site options, use that or compare against that. I'm surprised the top code works, there's a stray /> in the css that shouldn't be there.

      Comment


        #4
        Presumably you've set a value for your variable, and it exists in the Site1 folder?

        Comment

        Working...
        X