Web Design Forum: image path problem in header include - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

image path problem in header include

#1 User is offline   sash_007 

  • Trap Grand Marshal Member
  • PipPipPipPip
  • Group: Members
  • Posts: 638
  • Joined: 18-July 09
  • Reputation: 5
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 10 January 2010 - 11:08 AM

Hello friends,

I am using header include for my pages now  i got a weird problem my header include got the following code

<div id="head"><!--header start-->
<div class="c5">
<p class="c4"><a href="#" class="c1">Portfolio</a> <span class="c2">|</span> <a href="#" class="c3">FAQs</a> <span class="c2">|</span> <a href="contactus.php" class="c3">Contact us</a><span class="c2">|</span> <a href="http://neophytech.com/blog/" class="c3">Blog</a><span class="c2">|</span> <a href="http://www.neophytech.com/forum/" class="c3">Forum</a></p>
</div>
<div id="main">
<h1><img src="../images/logo.png" class="c6" alt="** PLEASE DESCRIBE THIS IMAGE **" /><a href="#">Neophytech</a></h1>
<h2><a href="#">power-packed-performance</a></h2>
<form action="#" method="post" id="search">
<fieldset><input type="text" value="search" class="button" /> <input type="submit" value="" title="Search" class="submit" /></fieldset>
</form>
</div>
<!--header end-->
where the problem is with the logo image 

i have changed the structure of my page  where  for instance there is webdesign folder within which there are index.php  and contains folder of smallbusiness,ecommerce,cms ,datbasedriven etc each containing index.php in them

now my problem is when i change the path of the logo image path to 
<img src="../images/logo.png" class="c6" alt="** PLEASE DESCRIBE THIS IMAGE **" />
it shows the logo only  here 

that is the index file within webdesign but when i go within the  ecommerce which is afolder within webdesign i getthis

so my query is shld i need to make a seperate include for the files with different paths 


0

#2 User is offline   TopShopper 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 878
  • Joined: 21-July 09
  • Reputation: 14
  • Gender:Male
  • Location:Cardiff, UK
  • Experience:Intermediate
  • Area of Expertise:Coder

Posted 10 January 2010 - 11:12 AM

If the image is delivered from differed folders it needs to be referenced to the site root and not be relative:
ie, needs to start with '/'
src="/images/logo.png"
0

#3 User is offline   TopShopper 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 878
  • Joined: 21-July 09
  • Reputation: 14
  • Gender:Male
  • Location:Cardiff, UK
  • Experience:Intermediate
  • Area of Expertise:Coder

Posted 10 January 2010 - 11:15 AM

OR add an image at 'http://www.neophytech.com/webdesign/images/logo.png'
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users