Re: Dreamweaver Image Issue

Participant ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

I'm having the same or similar issue. We also have site root relative paths set but when I followed your directions above, the setting was already set to Document. 

 

I had this code which worked fine:

 

background:transparent url(_images/globalNavGradient.png) repeat-x;

 

I wanted to change it to a new image, so I copied what had worked above with the new image name:

 

background:transparent url(_images/globalNav.png) repeat-x;

 

I can see the globalNav.png in my _images folder, but when I add it to my code - in every way I can think of - it still shows that the image doesn't exist. I've tried with quotes, without quotes, with leading slash, without leading slash. I've tried just using the background-image property instead of the shortcut. Nothing makes a difference.

 

I can go down the list of images in my _images folder. SOME of them, I can add and DW will recognize them, but others - that I can see are there - DW doesn't recognize them. Also, even the ones DW does recognize (meaning they show up in the suggested list DW gives me when I use the browse function) don't always show up in my localhost. SOMETIMES they do - but more often, they don't. The fact that some work and some don't makes me pretty sure it's not a path issue - also the fact that the original image that DOES work uses that same path. A caching issue? Something else?

 

Would love to have some help. Been working on this for a couple of hours. 

Views

137

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Mar 06, 2021 Mar 06, 2021

OK, so you have a path problem. 

 

Try this:

background: url(../_images/globalNav.png) repeat-x;

 

Just to clarify, the Templates folder (not _Templates) is for the DW Template.dwt files only.  If you're using DW's proprietary Templates for your site, you must never rename or move the Templates folder.  Doing so will cause your site to break.

 

Likes

Translate

Translate
Adobe Community Professional ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

Because the previous disussion was answered, I have moved this to a new discussion. This will attract more respondents.

 

This is the previous discussion.

Wappler, the only real Dreamweaver alternative.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

Thanks, Ben. In the meantime, I've done some more testing - no solution - but some more things to rule out:

 

1. Ctrl+F5, clearing cache, rebooting don't help.

2. I thought maybe the issue was that this particular style is on a style sheet that's linked to the main stylesheet. Since we also have site path constants for the style sheets, I thought maybe moving it to the top style sheet would help. I moved the style to the very top of the main style sheet. Right under body,html. NO difference. In other words, the original style still worked fine:

 

background:transparent url(_images/globalNavGradient.png) repeat-x;

 

The new style - based on a copy/paste of the above, did not:

 

background-image: url(_images/globalNav.png) repeat-x;

 

Also tried renaming the id of the style from id="globalNav" to id="globalNav1". Same result - original style works, new one doesn't. 

 

And then there's this one which is a REAL kicker:

 

I tried taking both images - _images/globalNav.png and _images/globalNavGradient.png and just putting them in a regular page as img tags. When I hover over both in DW, it says "Image not found" (and neither showed up in the suggestion prompts). HOWEVER, when I refreshed localhost, now the NEW one (globalNav) shows up in localhost but the original one (globalNavGradient) does not.

 

This kinda sounds like a bug of some sort? Although I'd love it if someone could hep figure out a fix or workaround. I really thought moving it to the main stylesheet would fix it - because of the site path/relative path issue DW has. But it didn't.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 06, 2021 Mar 06, 2021

Copy link to clipboard

Copied

@designer_shrink,

Did you define your local site folder and does it reside on your primary hard drive -- not a networked or cloud drive?

 

Are you using a local testing server and is it running?

Are the images on the local testing server?

 

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 06, 2021 Mar 06, 2021

Copy link to clipboard

Copied

Hi Nancy,

 

Yes, localhost is defined and lives on my C drive - XAMPP htdocs folder.

 

I'm not using a local testing server. Our testing server is a repo on bitbucket used by all developers in the company. I'm using git in Dreamweaver to push to that. I haven't pushed any of these changes yet since I can't get them to show up in local. I did go ahead and stage that new image file, though, in case that might make a difference. It didn't.

 

I did notice that my Creative Cloud account had some updates to DW today so I grabbed those - but that didn't make a difference either.

 

Thanks for your help.

Susan

 

 

Susan

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 06, 2021 Mar 06, 2021

Copy link to clipboard

Copied

CSS background is not the same as background-image.

 

CSS Shorthand {

background: #000 url(https://dummyimage.com/500x600) top center repeat-x scroll;

}

 

CSS Longhand {

background-color: black;

background-image: url(https://dummyimage.com/500x600);

background-position: top center;

background-repeat: repeat-x;

background-attachment: scroll;

}

 

When in doubt, validate your CSS code.

https://jigsaw.w3.org/css-validator/

 

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 06, 2021 Mar 06, 2021

Copy link to clipboard

Copied

Yes. I tried both the shorthand and the longhand version. Neither works. Both say "image not found" - and yet I can add that same image in an img tag and it displays on the page.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 06, 2021 Mar 06, 2021

Copy link to clipboard

Copied

Where is your CSS file located?

Where is the document located?

Where is the image located?

Did you try it with my dummyimage.com placeholder?

 

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 06, 2021 Mar 06, 2021

Copy link to clipboard

Copied

Your dummyimage.com placeholder works for both.

 

The CSS file, document, and image are all located in separate files off the root:

 

_images/

_styles/

_templates/

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 06, 2021 Mar 06, 2021

Copy link to clipboard

Copied

OK, so you have a path problem. 

 

Try this:

background: url(../_images/globalNav.png) repeat-x;

 

Just to clarify, the Templates folder (not _Templates) is for the DW Template.dwt files only.  If you're using DW's proprietary Templates for your site, you must never rename or move the Templates folder.  Doing so will cause your site to break.

 

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 06, 2021 Mar 06, 2021

Copy link to clipboard

Copied

LATEST

Good grief. Yes, you're right. Can't believe I spent SO many hours on this.

 

Thank you so much for your help. I'll be able to sleep tonight now.

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines