Forum Moderators: open

Message Too Old, No Replies

Image Display Issues outside of Dreamweaver

         

gregor

4:48 am on Feb 11, 2004 (gmt 0)

10+ Year Member



I'm piecing together my site and am having issues with images displaying properly outside of DWMX. Everything looks fine in Design View but when I preview in browser i get those awful red "X"s everywhere. I've even tried uploading the folder containing the images and the page to my server but still ... it's a no go. All image paths are correct.

Here's the code .... and I'm using XHTML 1.0 Tranistional:

<?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

</head>

<div align="center">

<body bgcolor="#000000">

<table width="755" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><img src="/taco/layout/headerleft.gif" width="145" height="100" /></td>

<td><img src="/taco/layout/headermain.gif" width="463" height="100" /></td>

<td><img src="/taco/layout/headerright.gif" width="147" height="100" /></td>

</tr>

<tr>

<td><img src="/taco/layout/leftcolumn.gif" width="145" height="400" /></td>

<!--------maincontent----------->

<td> 
</td>

<!--------endmaincontent-------->

<td><img src="/taco/layout/rightcolumn.gif" width="147" height="400" /></td>

</tr>

<tr>

<td>
 </td>

<td>
 </td>

<td>
 </td>

</tr>

</table>

</body>

</div>

</html>

And here's a link to the page:

<Sorry, no URLs. See TOS [webmasterworld.com]>

Ideas? Thanks!

[edited by: tedster at 6:07 am (utc) on Feb. 11, 2004]

yowza

5:02 am on Feb 11, 2004 (gmt 0)

10+ Year Member



Looks like you left out the

/whutevs/

in your path.

You should remove the url per site rules!

gregor

2:13 pm on Feb 11, 2004 (gmt 0)

10+ Year Member




Thanks for the heads up re: the URL posting ....

In Dreamweaver my site is configured like so:

root>taco>layout

... With the layout folder containing the images and .html page that I want to display. When I preview I see no images! I don't understand why because the image paths are correct.

?

stever

2:19 pm on Feb 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Aren't you using document-relative URLs there? If that is the case and the images are in the same folder as the HTML page as you say then surely the URL should be <img src="headerleft.gif" width="145" height="100" /> instead of <img src="/taco/layout/headerleft.gif" width="145" height="100" />...

kittimakai

2:34 pm on Feb 11, 2004 (gmt 0)

10+ Year Member



Remove the first backslash from the file path if you have images in subfolders.

So

img src="/taco/layout/headerleft.gif"

becomes

img src="taco/layout/headerleft.gif"

This is one of DW's quirks and something that really bugs me too

mat

3:09 pm on Feb 11, 2004 (gmt 0)

10+ Year Member



As stever points out, you might want to use document-relative links. Yours are root-relative, and will only work on a local DW preview if you are also running a local webserver, correctly configured and 'pointed-at' from within DW.

gregor

3:30 pm on Feb 11, 2004 (gmt 0)

10+ Year Member




Thanks all, I'll try and work it out later tonight after work (I don't have access to my files right now).

gregor

8:05 pm on Feb 12, 2004 (gmt 0)

10+ Year Member



* Resolved *

Thanks all ... my images were linked as root-relative and this was causing the problem.

I "fixed" the problem by deleting my images and going Insert>Image in DWMX with doc-relative checked instead of root-relative.

<newb>

Maybe a little off topic but how do you convert doc-relative links to root-relative in DWMX manually (in code view)? What I mean is, I tried editing the image source path from "/folder/folder/img.gif" to "folder/folder/img.gif" (ie. root-rel to doc-rel) but still they didn't appear? Why not? Am I missing something here?

</newb>

Thanks.