homepage Welcome to WebmasterWorld Guest from 54.242.85.89
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
Forum Library, Charter, Moderator: open

WYSIWYG and Text Code Editors Forum

    
Linking images with Dreamweaver
jpg help and html
Gomideast




msg:3198381
 6:46 pm on Dec 23, 2006 (gmt 0)

So I made a new website and my hosting company let me have it within my old website in a new folder.

The titles are fake but let's say the new folder is:

"sports"

within this folder is my new website, including index.htm, and a folder for pictures called "pictures"

when i link a picture using dreamweaver it directs it like so: img src="/pictures/burgerlogo.jpg"

but online it doesn't come up because the url becomes:

http://example.com/pictures/burgerlogo.jpg

it should be

http://www.example.com/pictures/burgerlogo.jpg

does anyone know how to fix this? even if i hand code it the code says img src="/pictures/burgerlogo.jpg"

how can i add a 'www' onto it?

thank you!

[edited by: encyclo at 8:02 pm (utc) on Dec. 23, 2006]
[edit reason] switched to example.com [/edit]

 

eelixduppy




msg:3198383
 6:50 pm on Dec 23, 2006 (gmt 0)

Why don't you call it relative to the current directory?

<img src="pictures/burgerlogo.jpg" />

rocknbil




msg:3198391
 7:05 pm on Dec 23, 2006 (gmt 0)

Well, this is the problem with WYSIWYG editors. Anyway here's your solution. Look:

The titles are fake but let's say the new folder is: "sports". within this folder is my new website, including index.htm, and a folder for pictures called "pictures"

when i link a picture using dreamweaver it directs it like so: img src="/pictures/burgerlogo.jpg"

What you want is to either 1)create a folder on your local drive called sports so you have /sports/pictures/burgerlogo.jpg and update your local pages, or 2) change your code so it reads /sports/pictures/burgerlogo.jpg.

The problem is not in http:// or [www....] The leading / means "wherever I am, start at the domain root." So it doesn't matter if you're using www or not:

http://example.com/sports/pictures/burgerlogo.jpg.
http://www.example.com/sports/pictures/burgerlogo.jpg.

Are led to the same place by
/sports/pictures/burgerlogo.jpg.

The advantage of using the leading slash: doesn't matter whether your file is at root or in a sub-sub-sub directory, the path remains the same. You don't have to count slashes and dots. :-) ../../../

Gomideast




msg:3198477
 9:58 pm on Dec 23, 2006 (gmt 0)

Thanks for your help, it's driving me nuts

would i have to manually enter the url for the pictures?

let's say my sites look like this:

old site main folder
- old site index
- old site picture folder
- old site content
- new site
- new site index (within new site folder)
- new site picture folder (within new site folder)
- picture (within new site picture folder)

and i wanted to get the picture in the new site picture folder to appear, on my new site domain name

dreamweaver is listing it simply as href- /new site picture folder/picture

but it's not coming up

should i put the whole url in the code like: [old...] site.com/new site/new site picture folder/picture.jpg?

will i have to do this for every single picture?

when i click on my image in dreamweaver it says (among other things):
file name: picture
files of type: image files

url: /new site picture folder/picture.jpg
relative to: site root

[edited by: Gomideast at 9:59 pm (utc) on Dec. 23, 2006]

Gomideast




msg:3198479
 10:01 pm on Dec 23, 2006 (gmt 0)

also, when i put the url in my browser address bar, such as:

[new...] site.com/new site picture folder/picture.jpg

the image comes up fine, alone, but it's still listed at that address and is (therefore? i assume?) hosted at that address and should appear within the site as well?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved