dreamweaver +course - absolut and relative addresses
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Dreamweaver Training and help » dreamweaver +course - Absolut and relative addresses

dreamweaver +course - Absolut and relative addresses

resolvedResolved · Low Priority · Version Standard

replyReply Tue 18 Dec 2007, 15:41Delegate George said...

George has attended:
Dreamweaver Introduction (2 days) course

Absolut and relative addresses

Can you explain the diferrence between these two types of addresses please

For upcoming training course dates see: Pricing & availability

replyReply Wed 19 Dec 2007, 09:23Trainer Richard said...

RE: Absolut and relative addresses

Hello George

Thank you for your forum question regarding what the difference between absolute and relative adresses is.

Lets start with the basics:

All hyperlinks need an address to which they point to. There are several types of addresses that hyperlinks can point to, for example:

http://www.google.com
c:\mydocuments\file.ext
/images/picture.jpg
../images/picture.jpg


When you point hyperlink to a destination, there are 2 ways to refer to this.

ABSOLUTE
This means that the link will always point to a specific location that is fixed.
Examples of this would be:
www.google.com
c:\websitename\imagesfolder\image.jpg

With regards to external websites, such as google, this works well, as the addres will never change. But with the internal link, in this case the image file, there will be an error in linking to that image file once you upload the website to a web server. This is because the hyperlink points to the C:\ on the current machine. so it may work fine on development machine, but as soon as you upload it, the folder will no longer exist in the location you specified, because it was absolute.


RELATIVE
Relative addressing solves the above problem, in that it specifies a location in a flexible way. So instead of afixed address, it would look something like:

/images/image.jpg

The format will vary depending on the location of the file that you are linking from. So if your page is located in the root of the website, and you are linking to another folder, then the address would be:

/foldername/filename.extention

If your page is in a folder, and you need to navigate to another folder, Dreamweaver will specify that by using the following syntax:

../images/image.jpg

The ".." specifies that the link will navigate up one directory level, and then find the folder.
So if you needed to go 2 directories back, it would be:

../../images/image.jpg

Hope that helps, and feel free to post any further questions you want assistance with to our forum.

Regards

Richard
DreamWeaver Trainer


 


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard