We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3419
    • 11 Posts
    Any ideas why?

    Static vs modx

    The paths for the images in the css are all correct. What i´m missing? huh

    Thank´s in advance.
      • 28008
      • 23 Posts
      Took a look at your static and modx example and I think you’re linking to the images incorrect:

      In the modx version your CSS file is located at "assets/templates/qoska/css/style.css". In your CSS file you link to "../images/image_header.png". Effectively located at "assets/templates/qoska/images/image_header.png".

      In your template you link to eg. "images/logotipo.png" instead of "assets/templates/qoska/images/logotipo.png". Try using "[(base_url)]assets/templates/qoska/images/logotipo.png" in your template.

      Hopefully that will solve your problems.
        For those about to rock... I salute you
        • 3419
        • 11 Posts
        Sorry but i fail to understand your point of view. The reason is simple; the footer and logo images have the same path than the rest and are displayed.
          • 28008
          • 23 Posts
          Maybe I’m completely wrong, but when I look at the source code of you’re modx version, I do get the impression your images are located at "http://www.qoska.com/assets/templates/qoska/images/".

          In you’re source code I see you’re looking at "http://www.qoska.com/image/" most of the times. Except for the image you point at in you’re CSS file and the "logotipo.png". By the way, the last image wasn’t visible yesterday. It originally linked to the wrong folder, but I guess you made some changes.

          So when you load your CSS file in "http://www.qoska.com/assets/templates/qoska/css/" and use ulr(../images/some_image.png), you’re loading an image from "http://www.qoska.com/assets/templates/qoska/images/some_image.png".

          But when you try to load "images/some_image.png" from "http://www.qoska.com/index.html", you’re trying to load an image from "http://www.qoska.com/images/some_image.png". The wrong folder, because the images are in "http://www.qoska.com/assets/templates/qoska/images/".

          So try what I suggested in my first reply:

          In template (some examples):

          <link rel="stylesheet" type="text/css" media="screen, print" href="[(base_url)]assets/templates/qoska/css/default.css" />
          <script src="[(base_url)]assets/templates/qoska/javascript/default.js" type="text/javascript"></script>
          <img src="[(base_url)]assets/templates/qoska/images/logotipo.png" />

          In CSS file:

          url(../images/logotipo.png);
            For those about to rock... I salute you
            • 3419
            • 11 Posts
            Thanks for the explanation, you´re wright. but now another issue appear >:( Or there is something that i´m failing to understand, or i´m becoming an ass by the minute >:(
              • 3419
              • 11 Posts
              Quote from: Biofobico at Apr 04, 2008, 06:54 AM

              Thanks for the explanation, you´re wright. but now another issue appear >:( Or there is something that i´m failing to understand, or i´m becoming an ass by the minute >:(

              Darn!! I´m such a noob shocked. I was editing the css of the static page instead of the modx one. Sorry for that and thanks for your patience. Finally this crazy week is ending tongue.

              Thanks once again.