Skip navigation
Currently Being Moderated

template background image disappears when I make a new page from the template

Dec 31, 2012 1:24 PM

I have a  background image in my container in my template.  When I make a new file based on this template, the background image disappears.  Any ideas why?

  • Currently Being Moderated
    Dec 31, 2012 1:47 PM   in reply to bdab

    Did you save & name the newly created child page yet?

    Usually, when you save it, DW reconciles the path to images and other assets for you.



    Nancy O.

    Mark as:
  • Currently Being Moderated
    Dec 31, 2012 2:51 PM   in reply to bdab

    The relevant CSS code is this:


    #container {

    background-image: url(../_img/edited-Water_drk_blue.jpg);



    If you saved your child page to the site root (where your index.html is located), the path to your background image should look like this without the leading dots and slash ../


    background-image: url(_img/edited-Water_drk_blue.jpg);


    If that is correct, I'm guessing the leading underscore _ in your img folder name is creating an unwanted  problem.  You should rename your _img folder to just img or image.




    Nancy O.

    Mark as:
  • Currently Being Moderated
    Dec 31, 2012 3:47 PM   in reply to bdab

    That path is pointing to files on your local hard drive instead of your local site folder.



    Are you working within a defined site in DW?

    Without this critical first step, DW cannot properly manage site assets for you.


    Go to Site > Manage Sites > New...

    Tell DW where to find & save your local site files.


    After you're finished defining your site, the Files Panel in DW (F8) should resemble this basic set-up:


    YourSiteName (C:\YourSiteName)





              main.dwt (your main template file)

         - Img


         + SpryAssets

         + Styles

         + Scripts




    Nancy O.

    Mark as:
  • Currently Being Moderated
    Jan 2, 2013 1:37 PM   in reply to bdab

    Open your child page in code view.

    Manually correct the path to your background-image as described in my earlier post.  Save.  Preview in browser.


    Did this help?



    Nancy O.

    Mark as:
  • Currently Being Moderated
    Jan 2, 2013 6:20 PM   in reply to bdab

    be smart about where you are saving your files made ​​from the model, because if you save some folder inside the dreamwever not follow the same path. I've not used the site models in my [link removed], and also do not recommend using these unless they are absurdly large.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points