Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » absolute or relative referencing in html
Closed Thread
Old 06-07-2005, 01:30 PM   #1 (permalink)
 
True Techie

Join Date: Jan 2005

Posts: 123

Troubledyouth

Default absolute or relative referencing in html

how to you do absolute and relative referencing in html(ie getting a picture to load on a page that is saved in a different folder but the folder is just down the file tree a little bit more.
__________________
<img src=\"http://www.eraserinc.com/ims/pic.php?u=15tfnhP&i=56\">
<font size=1>Asus P5P800 Mobo, Intel P4 2.8Ghz,1Gb (2x512)Corsair Value Select Ram,BFG Tech 6800 OC,19\" Sony LCD monitor,Seagate 80GB Hard drive,Samsung DVD burner<and a crap power supply that just went out on me</font>
Troubledyouth is offline  
Old 06-07-2005, 02:29 PM   #2 (permalink)
 
Monster Techie

Join Date: May 2004

Location: /usr/root/mn/us

Posts: 1,121

bla!! is on a distinguished road

Default

You can put the path the the picture in the <img> tag.

For example, my page is in the home directory of the webpage, but my picture is in the images folder, the tag would look like this

[img]images\pic.jpg[/img]

You can go in as many directories as you want.
__________________
<br>
Its a frigging Laptop, not a Labtop!!!!
bla!! is offline  
Old 06-07-2005, 03:34 PM   #3 (permalink)
 
Super Techie

Join Date: May 2005

Posts: 479

furtivefelon

Default

always use absolute reference, as it perserves the linked file even if you changed the dir structure

use: http://yourdomain.tld/yourfolder/yourfile
__________________
lisp hacker
running: FreeBSD 5.4 - still learning
develop with: SBCL + emacs for lisp, Anjuta IDE +gcc for c, SPE for python..
browse with: opera
furtivefelon is offline  
Old 06-07-2005, 04:53 PM   #4 (permalink)
 
Ultra Techie

Join Date: Sep 2003

Location: Bamberg, Germany

Posts: 549

Iron_Cross

Send a message via ICQ to Iron_Cross Send a message via MSN to Iron_Cross Send a message via Yahoo to Iron_Cross
Default

I think you can also use:
Code:
<img src="../somefolder/someimage"
The tree for that example is like this:
Code:
somebasefolder
        |
        --somefolder
        |        |
        |        --someimage.jpg
        |
        --folderofhtml
                |
                --the html file you're using.html
The "../" means go back one folder. Test it to make sure, but I think that works.
__________________

See today\'s Penny-Arcade!(May contain foul lanuage)
Pain is weakness leaving the body.

PM Me for my MSN
Iron_Cross is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On