• Login
  • Register

DNN Forums

A community discussion page. We're starting from scratch, so...let's get the party started!

DNN 9.4, not showing BG image in child pages.

You are not authorized to post a reply.
Sort:


Basic Member


Posts:47
Basic Member

    DNN 9.4, Skin, Bootster V2, BG image not showing in child pages, but showing perfectly in parent pages. Any pages that reside under a parent page, is not displaying the background image, but in the source code, it's commanding it. Is there a setting that I missed or something?



    Veteran Member


    Posts:620
    Veteran Member

      Can you check the site with your browser's developer tools to see what is happening?

      How are you specifying the image?
      Joe Craig
      DNN MVP
      Patapsco Research Group


      Basic Member


      Posts:47
      Basic Member

        Hi again Joe, and thanks for helping me again.
        Ok, I originally had the BG image added to the home.ascx and skin.ascx files, in  the following code;

        <style type="text/css"><br /> body {
          background-image: url('images/bg2.jpg');
          background-attachment: fixed;
          background-size: 100%;
        }
        </style>

        This worked perfectly for all pages that are in the main menu, but any pages that were in dropdowns (child pages), were not displaying the BG image. Just a little while ago, I removed the code from the home and skin.ascx files and added it directly to the page settings/advanced/SEO -->> page header tags, this again work perfectly for the parent pages, but no luck with the child pages. The Background for the child pages are still just plain white. 
         (Hope this makes sense)



        Basic Member


        Posts:47
        Basic Member

          <style><br /> body {
            background-image: url('images/mark-bg1.jpg');
            background-attachment: fixed;
            background-size: 100%;
          }
          </style>



          Basic Member


          Posts:47
          Basic Member

            **The line break tag is not in the code. I don't know why the reply editor keeps adding that.



            Basic Member


            Posts:47
            Basic Member

              .



              Veteran Member


              Posts:620
              Veteran Member

                Jeff,

                One of the tricky things about writing CSS is to make sure that references actually point to where you want them to point.

                You need to learn how to use your browser's developer tools so that you can inspect, not the code that you wrote, but the code that is delivered to your screen. If you do that, I'm sure that you'll find that the url for the child pages background image is not what you expect it to be. That's because the code for the child pages has a url that includes the parent page and, as a result, the image url does. too.

                That's because your image references are relative links, so DNN has to decide "relative to what."

                If you use the developer tools, this should become quite clear, and lead to to better ways to make the references.

                By the way, it's really not a good practice to put CSS directly in skin or container files, or even in HTML content. Instead, put class references and put the CSS in appropriate CSS files.
                Joe Craig
                DNN MVP
                Patapsco Research Group


                Basic Member


                Posts:47
                Basic Member

                  Ok, You just nailed it! Turns out, it was the image URL that was causing the problem! Thank you so much! And yes! I am learning all I can about the tools and how to do everything!

                   Again, Thank you very much!

                   



                  Veteran Member


                  Posts:620
                  Veteran Member

                    If you are building web sites and not using browser developer tools, stop what you are doing now and learn to use them!
                    Joe Craig
                    DNN MVP
                    Patapsco Research Group


                    Basic Member


                    Posts:47
                    Basic Member

                      I've been doing exactly that. I never knew how helpful that is.
                      Thank you so much.

                      You are not authorized to post a reply.

                      These Forums are dedicated to discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      4. No Flaming or Trolling.
                      5. No Profanity, Racism, or Prejudice.
                      6. Site Moderators have the final word on approving / removing a thread or post or comment.
                      7. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved