The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Directories
CaptMarlinspike
post Dec 12 2006, 08:54 AM
Post #1





Group: Members
Posts: 5
Joined: 12-December 06
Member No.: 1,274



Sorry to have to ask dumb questions, but...

I would like to put images in a sub directory to keep things tidy. If I am using the statement

<img src="6Queensoutside.JPG" width="85" height="64">

how do I reference a sub directory, say called "images", so that the html finds the picture?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
JamieHarrop
post Dec 12 2006, 09:04 AM
Post #2


Advanced Member
****

Group: WDG Moderators
Posts: 129
Joined: 25-October 06
From: West Yorkshire, UK
Member No.: 570



Use <img src="/images/6Queensoutside.JPG" width="85" height="64">

The forward slash before "images" is used to point to the root directory of your Web site ( http://www.ashburnproperty.co.uk )
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CaptMarlinspike
post Dec 12 2006, 09:18 AM
Post #3





Group: Members
Posts: 5
Joined: 12-December 06
Member No.: 1,274



QUOTE(JamieHarrop @ Dec 12 2006, 09:04 AM) *

Use <img src="/images/6Queensoutside.JPG" width="85" height="64">

The forward slash before "images" is used to point to the root directory of your Web site ( http://www.ashburnproperty.co.uk )



Got it, thanks Jamie.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 12 2006, 09:47 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Or you can use relative URLs.
'sub/pic.jpg'
You can read about all that here:
http://htmlhelp.com/faq/html/basics.html#relative-url
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Dec 12 2006, 10:07 AM
Post #5


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



QUOTE(JamieHarrop @ Dec 12 2006, 03:04 PM) *

Use <img src="/images/6Queensoutside.JPG" width="85" height="64">

The forward slash before "images" is used to point to the root directory of your Web site ( http://www.ashburnproperty.co.uk )

That's the best solution online. Just note that it will not work on local files, where a beginning slash equals the HD root.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
JamieHarrop
post Dec 12 2006, 10:09 AM
Post #6


Advanced Member
****

Group: WDG Moderators
Posts: 129
Joined: 25-October 06
From: West Yorkshire, UK
Member No.: 570



QUOTE(Christian J)
Just note that it will not work on local files, where a beginning slash equals the HD root.


Unless you have Apache installed and running and you're accessing the files through localhost, of course. But hey, that's another discussion for another day. smile.gif

This post has been edited by JamieHarrop: Dec 12 2006, 10:10 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Dec 12 2006, 01:32 PM
Post #7


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



QUOTE(JamieHarrop @ Dec 12 2006, 04:09 PM) *

QUOTE(Christian J)
Just note that it will not work on local files, where a beginning slash equals the HD root.


Unless you have Apache installed and running and you're accessing the files through localhost, of course.

Doesn't work for me anyway, since my various projects are located in sub directories to localhost. sad.gif

QUOTE
But hey, that's another discussion for another day. smile.gif

Absolutely. CaptMarlinspike, you can safely ignore this digression! smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 11:19 AM