My problem is the opposite to most image problems. I have just downloaded my web site [not designed by me] into Expression Web2, which I have just purchased. However I cannot get the images or styles to show although they all show perfectly on the published web site.

I have tried downloading again and synchronising, all to no avail.

I then looked at the code and compared it to the code from the same page which I downloaded a month or so ago which displays correctly in ‘expression web’. I cannot read or write HTML but noticed the following:-

on the original it read for example:-
<link href="style.css", whereas the one which would not work read <link href="../style.css"

likewise with the images for example on the one that worked read:-
<a href="enquiry.htm"<>img src="images/contacttop.gif"

whereas the other read:-
<a href="../enquiry.htm"<>img src="../images/contacttop.gif"

How did the ../ get into all the links so they did not work on the local site although they still worked on the remote? What does ../ mean?

Dani AI

Generated

Common cause: the downloaded copy on disk does not match the live site's folder layout, so the relative asset paths in the HTML point to files that are not where the local pages expect them to be. That matches the observations from , and : the links are relative and the download process changed the local hierarchy.

Practical diagnosis steps:

  • Inspect the site folder in the file manager and note where the HTML files sit relative to the CSS and image folders.
  • Open a page in Expression Web and view an asset link in the Properties/Code view to confirm the path Expression Web is trying to resolve.
  • Use the browser console/Network tab when previewing the file to see which assets return 404 and what exact paths are being requested.

Ways to fix (pick the least-disruptive):

  • Recreate the server directory tree locally so relative references continue to work (simplest when publishing and testing locally). This was the approach suggested by .
  • Convert links to root-relative or absolute URLs so they resolve regardless of local folder depth, or add a site-wide base URL. Example of a base tag:
    <base href="http://example.com/">

    Use care: a base tag changes how all relative URLs resolve.

  • Use a batch Find/Replace across the site to update path prefixes, but test before republishing to avoid breaking the live site.

Notes and cautions:

  • Root-relative paths (beginning with a site root) behave differently when opened via file://; previewing through a local web server (XAMPP/WAMP/MAMP) or Expression Web’s publishing preview will mirror server behavior.
  • Bulk edits of paths can fix local previews but may require re-checking before uploading to the remote host.

For background on how relative and base paths resolve, see MDN’s guidance on working with files and the HTML base element: Dealing with files on the web and HTML base element.

Recommended Answers

All 3 Replies

../ means "up one directory". My suspicion is that during your download process it would have arranged your files in such a way that the images were in the parent directory of the html. Just look on your file structure and make sure the images are there, if not move the images or change the links.

I use expression web myself...

- Make sure the folder on your computer recreates the file structure in your public_html directory so your site will display properly when checking it locally.

- Edit the all the links in the html so that they correspond to the directory structure. Which will probably just mean going through and removing all the ../ so if its an image it should be "images/image.jpg" if its a stylesheet it should be either "style.css" or "style/style.css" (if you have several style sheets and have grouped them in their own folder) for example.

Save and reupload your website and you will have no problems int the future.

This happens when a browser does the downloading to a folder.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.