View Full Version : Inserting new header.gif

02-10-2008, 12:39 AM
I have inserted a new header/banner.gif into my php pages which I renamed to the original one and then when I uploaded it it replaced the original. This is what was called for on two of my php sites, however my new site, I was told to put the gif up using a full url http://www.path. How is this done? the header is now up however and is on all pages. I have never done this before.

02-11-2008, 02:49 PM
I'm not clear about your question. However, I think you are asking about what it is called an absolute path:
<img src="http://www.yoursite.com/images/image1.jpg">

realtive path is:

<img src="images/image1.jpg">


<img src="../image1.jpg">

hope it helps.

02-11-2008, 04:15 PM
Yes that is what is meant, however, I have never done this within dreamweaver, its always been a reative path, in the folder in my c drive. I did with a relative path and up loaded to site, it works fine, I guess. my four html pages link to a php script, and of course the header is in the php pages. on two other php sites I have I substituted one header gif for another, that worked fine. I still am unsure how to do it with an absolute path. never done it before, thanks

02-11-2008, 08:33 PM
mangofreak is showing you what the code should look like. basically, your new .gif file is in a folder on your site. right? probably named "images". so you need to call the picture through the absolute path like mangofreak shows. except, you will substitute your file path (i.e. your site, image folder, image name). if you have subfolders, you will need to include them as well.

to do this (assuming your header is a .php file included on every page):

open your header.php page in DW
find the image you want to change
change the <img scr="../images/oldimage.gif"> (or what ever your image is called) to <img scr=http://www.yoursite.com/images/newimage.gif> (substituting your file names)if you have your header loading as an include(header.php) then it will change the image source path to an absolute path on every page.

Good luck!

02-11-2008, 09:23 PM
thats the issue there is no image folder, I guess I could put one up, but the script had none, just for kicks you can look at it, www.globalbizsales.com (http://www.globalbizsales.com). when you go to listings or register etc, then those are the php, front page just html, I am assuming those faint lines under header are table lines. my other site www.petplanetvideos.com (http://www.petplanetvideos.com) has a image folder and I can work with that, but on that one I just renamed the header.gif and put it in the image folder and there you go, no problem, not on the new site tho. thanks

02-11-2008, 09:58 PM
I see the issue...

the first page of your new site is based on a template. The name of the header image on the front page is template1.png on the other pages its banner.gif.

If you want it to look the same way but just want to move the image to a absolute path, you need to change this:

<img src="template1.png" width="775" height="680" hspace="150" border="0" usemap="#Map" alt="We would like to list your business for sale" />

to this:

<img src="http://www.globalbizsales.com/template1.png" width="775" height="680" hspace="150" border="0" usemap="#Map" alt="We would like to list your business for sale" />

that is the absolute path to the image. If you create an "images" folder then change it to:

<img src="http://www.globalbizsales.com/images/template1.png" width="775" height="680" hspace="150" border="0" usemap="#Map" alt="We would like to list your business for sale" />

02-11-2008, 10:49 PM
No the header is only on the php pages, Front page, contact, about, and services are html. they stay the way they are, its only the header on php pages, not the template, the header was part of the template to begin with. here is the code I used:<img src="banner.gif" width="638" height="156" /> and the script writer indicated to make it an absolute path, which might be:
<img src="http://www.globalbizsales.com/banner.gif" width="638" height="156" /> or what?. but my question has always been, since there is no image folder where would you put the gif and the fact that I have never linked an image like this on any site I have ever done, I didn't know how or even if it was neceassry, if I replaced the original gif there was with mine and it worked.

02-12-2008, 12:36 AM
the absolute path in your post is correct, if you want to keep banner.gif

if you want to change it, just put the new image in the same folder (this may be the root folder) as the banner.gif image and change the path in your post to the new image.

i would recommend creating an "images" folder... that's kind of the standard thing to do. if you create an "images" folder make sure you include the folder name in the absolute path.

02-12-2008, 01:44 AM
To add an image folder is a matter of organization. I like having my files organized as images or asp or php. It is easier to maintain, even if you have someone else working on it. I would also suggest you have your image files in an image folder and leave your php and html files on the root directory.

I sometimes also have a body_images folder only for those images that make-up my templates and hold the layout together. So if I want to make changes to the template all my files are there. ;)

02-12-2008, 04:47 AM
yes, thats what I would think, images go in an images folder, however, back to this issue. there are no images, for the php script, just the one I created
for a header, so far no one has really answered my question, I needed my header image to show on all the php pages to match my template for the home, contact, about, and services page, ok so I put the header into the header.php page and the image in that folder, and the image in two other folders, and it works, what the script writer said, I should make the image an absolute path, when I put the image in the page header.php, it is a relative path. if I were to make the gif absolute, i.e. http://www etc how is it handled in comparison to being an image on the page, image.gif. I am not sure how to do it