We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41172
    • 7 Posts
    Hello,
    I'm using the Flexibility template (if that makes any difference) in Revo 2.2.4. How do I change the whole site background color?
    Thanks. [ed. note: julesjh last edited this post 14 years ago.]
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Use the .css file. It will probably be the CSS for the body tag.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 41172
        • 7 Posts
        I altered the entries in the index.css file, to use the color #fefef5, but there must be something overriding it:

        body, html {
        height: 100%;
        background-color: #fefef5;
        }

        .x-viewport {
        overflow:auto;
        }

        body {
        margin-bottom: 1px; /* avoid jumping scrollbars */
        color: #fefef5;
        font: 13px/17px Arial, Helvetica, sans-serif;

        This page seems to offer something close, but I don't know how to implement it:
        https://forums.modx.com/thread?thread=7323

          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Are we talking about this template? http://designfromwithin.com/flexibility/demo/
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 41172
            • 7 Posts
            Hi Sottwell,

            Yes, that's the one smiley
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I don't see any index.css file in there.

              In foundation.css I see

              body { background: white; ... 
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 41172
                • 7 Posts
                Hi sottwell,

                You know, that did the trick! I was looking in the wrong file...

                At least I now know where the basic configurations are...

                Thanks very much!

                Regards,
                Jules
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  The trick is to do a view source of the page, and see what .css files it's loading.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 10208 ☆ A M B ☆
                    • 1,780 Posts
                    Flexibility uses two CSS files. the foundation.css file in assets/templates/flexibility/stylesheets handles most of the basic styles from the foundation framework, and the Flexibility styles are in the style.css in the flexibility folder.

                    You can override most of the foundation styles by using the style.css, and adding a selector from foundation.css, with just the overriding style applied. Since Foundation is still updated regularly, this will save your styles should you decide to update that file.

                    Foundation's been updated at least 3 times in the past year, that I know of.

                    There's also this issue with the header meta tags, and this information will save you a lot of grief in the future when you see it.

                    In the flexibilityHeader.html this meta tag exists (you'll find this also in the MODX HTML5 Boilerplate package):
                    <meta name="description" content="[[*introtext:empty=`[[*content:strip_tags]]`:limit=`200`]]" />


                    It doesn't work very well. When it does work, it will place any snippet called within the first 200 characters into your head, process it (with errors) and you'll see the faulty snippet result twice in the page. Once above the header, stripped and erroring, and in the page itself, possibly malfunctioning. There's a couple solutions, neither of which is a good one.

                    1-make sure the introtext field contains "something" in each resource. As long as introtext isn't empty, it won't strip and insert the snippet in the head. But you also get no description for your pages.

                    or

                    2-omit the
                    :empty=`[[*content:strip_tags]]`:limit=`200

                    in the meta tag. Which also leaves your description empty if the resource editor fails to fill in introtext.



                      Frogabog- MODX Websites in Portland Oregon
                      "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                      Having server issues? These guys have MODX Hosting perfected - SkyToaster
                      • 41172
                      • 7 Posts
                      Thanks guys for the tips. Always worth bearing in mind the pitfalls too, as pointed out above.

                      Will cut and paste that one for future reference...

                      Jules