Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kunihirodestro

macrumors newbie
Original poster
Sep 21, 2006
19
0
UK
Hi,

Im using dreamweaver MX 2004 and all of a sudden when I go to preview pages in the brower window the images don't appear.

All my links are working, can anyone give me a hint as to what I've managed to do, it's really annoying me now!:mad:
 

CanadaRAM

macrumors G5
Hi,

Im using dreamweaver MX 2004 and all of a sudden when I go to preview pages in the brower window the images don't appear.

All my links are working, can anyone give me a hint as to what I've managed to do, it's really annoying me now!:mad:

The bolded part is patently not the case.
What is usually the case is either the images are being referenced at the real website (http://www . domain . com / images/ etc)
Or that they are being referenced relative to the root of the site, and what you THINK is the root is not the root defined in Dreamweaver's site setup.

Did you recently move folders, rename folders, do a search and replace on IMG SRC's to correct them? Or redefine a template? Or copy and paste code from a page in one directory to a page in a different directory?
 

rogersmj

macrumors 68020
Sep 10, 2006
2,161
1
Indianapolis, IN
CanadaRAM hit most of the main points there. This is something a lot of people have to deal with when they let WYSIWYG editors like Dreamweaver write code for them. If you're making a static site, then the best way to reference your images is to use relative paths. That is, relative to the document you're calling them from. For example, say you have a site structure like this:

Code:
[b]site/[/b]
  [b]css/[/b]
    main.css
  [b]downloads/[/b]
    fileList.html
  [b]images/[/b]
    banner.jpg
    button.gif
    picture.jpg
  index.html

You want to reference an image from index.html; your img tag would look like this:

HTML:
<img src="images/banner.jpg" alt="Some title">

If you were referencing an image from downloads/fileList.html, it would look like this:

HTML:
<img src="../images/picture.jpg" alt="Pretty picture">

That double dot means "go up one directory". You would use the same path if you were referencing images from the main.css file in this example.

The point is, if you build all your image paths (and internal href links) like that then you can move the site anywhere and it will always work without any modification. Now, if you're building a dynamic site using PHP or something there's a much better strategy, but it doesn't sound like you're doing that.
 

kunihirodestro

macrumors newbie
Original poster
Sep 21, 2006
19
0
UK
Thanks for your help... but basically I know little and am simply dragging and dropping and using dreamweaver like a design package. As far as I know the root folder is set up correctly.

I've found that if I drag and drop the images, .fla etc from the assets drop down then it all works just fine.

But as soon as I drag from the Files it doesn't.

Sorry for my simplicity,

And it happens even when I set up a new defined site.

Any help will be appreciated, if not I'll work it out one day as my knowledge grows.
 

rogersmj

macrumors 68020
Sep 10, 2006
2,161
1
Indianapolis, IN
Honestly, I just provided you all the help you need. You're not going to get away with doing everything 100% dragging and dropping. You can set relative paths using Dreamweaver. If I recall correctly, there's a spot in the Properties pane for it, but it's just as easy to edit the code like I showed you above. You do have these images within your web site directory, right?
 

radiantm3

macrumors 65816
Oct 16, 2005
1,022
0
San Jose, CA
If your not willing to spend time learning some of the basics of how websites work, you should probably use iWeb instead. Dreamweaver is supposed to be a professional web design app (although that's very arguable) and you can't expect to be able to use dreamweaver with absolutely no fundamental knowledge.
 

jsm4182

macrumors 6502
Apr 3, 2006
346
12
Beacon, NY
If the files are linked right and the images aren't showing up check what mode the images are in. Certain modes such as CMYK won't display in most web browsers.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.