Making < IMG SRC = tag points to ROOT Directo

Results 1 to 5 of 5

Thread: Making < IMG SRC = tag points to ROOT Directo

  1. #1
    Stephen of New York Guest

    Default Making < IMG SRC = tag points to ROOT Directo

    Hello,<BR>How do I make the &#060;IMG SRC = "picture.jpg" &#062; tag point to the root directory ? <BR>Let&#039s say that I&#039m 3 levels deep on my web site but I want those web pages to point to the images in the root directory.<BR><BR>Stephen

  2. #2
    Join Date
    Dec 1969
    Posts
    172

    Default RE: Making < IMG SRC = tag points to ROOT Dir

    ../../../picture.jpg<BR>or <BR>/picture.jpg and use a base HREF

  3. #3
    Stephen of New York Guest

    Default RE: Thanks. What is a Base HREF.

    Thank you very much ;) <BR>can you please give me a specific example of using a Base HREF. I have never heard of that Tag Before.<BR>Stephen Sutherland

  4. #4
    Riva Guest

    Default That's probably not the best solution here

    ...at least in my opinion. &#060;base&#062; tags, used in the &#060;head&#062; of the document, allow a page to be viewed out of context, e.g. on a mirrored site. <BR><BR>syntax: <BR><BR>&#060;base HREF="http://www.you.com/your1stDir/yourSubDir/yourDoc.htm&#062;<BR><BR>this allows all your relative file names (including image file names) to have a point of reference. But I didn&#039t think you were asking about this kind of scenario.<BR><BR>BOL :)


  5. #5
    Join Date
    Dec 1969
    Posts
    172

    Default RE: That's probably not the best solution here

    &#060;base href="http:/www.yourcompany.com"&#062;<BR><BR>then any link in your site will be relative from that path.<BR><BR>&#060;img src="/images/picture.jpg"&#062;<BR><BR>would be www.yourcompany.com/images/picture.jpg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •