We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9986
    • 4 Posts
    Hi!

    I’m currently working on a custom Template for MODx. But I have a problem - my css file is not being loaded althoughI can open it, if I add the url to my domain.

    My Template code is up to now:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/xhtml1-strict.dtd">
    <html>
         <head>
              <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
              <base href=“[(site_url)]“ />
              <title> [*pagetitle*] | [(site_name)] </title>
              <link rel=“stylesheet“ type=“text/css“ href=“[(base_url)]assets/templates/crparr/css/style.css“ />
         </head>
         <body>
              <div id="main">
                   <div id="header"></div>
                   <div id="navigation">
                        [!Wayfinder?startId='0'!]
                   </div>
                   <div id="wrapper">
                        [*content*]
                   </div>
                   <div id="footer">{{footer}}</div>
              </div>
         </body>
    </html>


    When looking at the source code of the generated page, I can find the following:
    ...
    <link rel=“stylesheet“ type=“text/css“ href=“/assets/templates/crparr/css/style.css“ />
    ...
    <link rel="stylesheet" type="text/css" href="/assets/snippets/jot/templates/jot.css" />
    ...


    The jot.css is being loaded properly - what’s wrong?

    Thanks.
    Christopher Parr
      • 23299
      • 1,161 Posts
      Quick question: is your style sheet called style.css or styles.css?

      This screwed me up once...
        • 31227
        • 198 Posts
        change this:
        <link rel=“stylesheet“ type=“text/css“ href=“[(base_url)]assets/templates/crparr/css/style.css“ />

        into this:

        <link rel="stylesheet" type="text/css" href="[(base_url)]/assets/templates/crparr/css/style.css" />
          Pure MODx sites
          Viriko.ru & Viriko.com - Multilingual and running on 1 MODx