We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45739
    • 64 Posts
    My CSS Is not working for Articles. I have created a regular MODX Document, and an Articles page with the SAME template. The regular MODX Document works fine, while the Articles page has no CSS. I inspected element and all the CSS sheets are there and linked correctly, and I can not figure out the problem. I tried re-installing Articles as well.

    Here is my articles link: [link removed]

    Here is the link of a MODX Document using the same exact template: [link removed] [ed. note: yankindeez last edited this post 7 years ago.]
      • 3749
      • 24,544 Posts
      That's a good one. I did a diff on the two sources and they are identical except for one anchor tag. I can't imagine why they don't render the same.

      The HTML is not valid, BTW. You have some extra closing div tags in there:

      https://validator.w3.org/nu/?doc=http%3A%2F%2Fmetroitmedia.com%2Fblog%2F

      I don't know if that's the problem, but I imagine you'll want to fix it.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 45739
        • 64 Posts
        Quote from: BobRay at Apr 23, 2017, 08:00 PM
        That's a good one. I did a diff on the two sources and they are identical except for one anchor tag. I can't imagine why they don't render the same.

        The HTML is not valid, BTW. You have some extra closing div tags in there:

        I don't know if that's the problem, but I imagine you'll want to fix it.


        Thanks Bob. I fixed the issue. I had to write my CSS like this:
        [[++articles.assets_url:default=`[[++base_url]]assets/`]]css/style.css

        Is that common/new for MODX? I've never had to do that for previous websites I've built with MODX.. [ed. note: yankindeez last edited this post 7 years ago.]
          • 3749
          • 24,544 Posts
          I don't think so. It looks like it's using a trick (that first tag) that lets developers load things from their dev. area if a particular System Setting is set. It's supposed to revert to the correct URL if that Setting is missing, but apparently isn't working in your case.

          Try this (it will be significantly faster):

          [[++assets_url]]css/style.css




            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting