FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Image In Level Above





rafazamboni
Hi to all...

I am with a problem in the creation of my site...

Necessary to place an image that is in a folder a level above of the page where if it finds archive HTML...

For example:

Archive that contains the image - http://localhost/page/test/view.htm

Directory that contains the image - httP://localhost/page/image.jpg

How I can place this image in the page?
Aiz
there are two ways to do that.

One of which is just to type out the whole url to the image in the img tag like

Code:
<img src="http://blah.com/page/image.jpg></img>


second way is to use ".." before it all to redirect it up a level in directory.

Code:
<img src="../page/image.jpg></img>


Hopefully i didn't make some serious typo <.<;; it's 2am >.>;; head isn't in it's best state.
Stubru Freak
Aiz wrote:
there are two ways to do that.

One of which is just to type out the whole url to the image in the img tag like

Code:
<img src="http://blah.com/page/image.jpg></img>


second way is to use ".." before it all to redirect it up a level in directory.

Code:
<img src="../page/image.jpg></img>


Hopefully i didn't make some serious typo <.<;; it's 2am >.>;; head isn't in it's best state.


You did, you forgot your quotation marks. Razz

Code:
<img src="http://blah.com/page/image.jpg"></img>


Code:
<img src="../page/image.jpg"></img>
JustaMin
Stubru Freak wrote:
Aiz wrote:
there are two ways to do that.

One of which is just to type out the whole url to the image in the img tag like

Code:
<img src="http://blah.com/page/image.jpg></img>


second way is to use ".." before it all to redirect it up a level in directory.

Code:
<img src="../page/image.jpg></img>


Hopefully i didn't make some serious typo <.<;; it's 2am >.>;; head isn't in it's best state.


You did, you forgot your quotation marks. Razz

Code:
<img src="http://blah.com/page/image.jpg"></img>


Code:
<img src="../page/image.jpg"></img>


and you dont need </img>!
Stubru Freak
JustaMin wrote:
Stubru Freak wrote:
Aiz wrote:
there are two ways to do that.

One of which is just to type out the whole url to the image in the img tag like

Code:
<img src="http://blah.com/page/image.jpg></img>


second way is to use ".." before it all to redirect it up a level in directory.

Code:
<img src="../page/image.jpg></img>


Hopefully i didn't make some serious typo <.<;; it's 2am >.>;; head isn't in it's best state.


You did, you forgot your quotation marks. Razz

Code:
<img src="http://blah.com/page/image.jpg"></img>


Code:
<img src="../page/image.jpg"></img>


and you dont need </img>!


You don't need it in html, but in xhtml, you can choose to do:
<img src="" alt="" /> or <img src="" alt=""></img>
Rhysige
in XHTML *EVERY* tag that starts MUST be finished.
So in the above example <img src=""> becomes <img src="" alt="" /> note the alt aswell.. it is also needed.

<br> becomes <br />
<input type="text" name="form"> becomes <input type="text" name="form" />
Stubru Freak
Rhysige wrote:
in XHTML *EVERY* tag that starts MUST be finished.
So in the above example <img src=""> becomes <img src="" alt="" /> note the alt aswell.. it is also needed.

<br> becomes <br />
<input type="text" name="form"> becomes <input type="text" name="form" />


I know but we were talking about the img tag...
Rhysige
are you sure having </img> as a seperate end tag is XHTML Compliant?
Stubru Freak
Rhysige wrote:
are you sure having </img> as a seperate end tag is XHTML Compliant?


Wait a minute, I'll check.

Yes it is, in xhtml transitional and strict.
JustaMin
My point is that it's redundant code as you can just use /> to end the tag.
Related topics
anyone play MMORPG games?
redirecting domain to directory & directadmin - how?
Dream Theater, You Know?
Discussion ABOUT the “What is morality?...” thread
I need a loading bar that appears while (read inside)
Review my blog please!
Pingi
Is philosophy a science?
Chapter 2
Using PHP "OR" Logical Operator
Secrets Of SEO
Numerous Newbie Issues...
Whats happening with our marketplace?
Day 05 – Quick nifty hacks you’re proud of
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.