Putting an image in header...not logo. Drupal 5
Hi all! I'm having a tiny problem and I'm sure it's something stupid I'm overlooking- user error..lol. Modifying 'litejazz' theme.
I'm trying to place an image in the header region of my site floated left of the logo.
I've adjusted page.tpl.php and the css. The image is there- well, the placeholder is anyway- but the actual image ins't showing up. I've checked my spelling, quotes, open and close tags, etc. and copied my image to every single file in this themes folder just in case I had in the wrong place.
I just don't get it. It's there with the right width/height properties and the alternate text shows up just fine. It's all in the right place when I load the page, just no image.
I'm not that familiar with php, so I think maybe my problem may be in there. Here is my code for the image in page.tpl.php:
<div class="hatmain2">
<img src="hatmain2.png" alt="Vyce" width="143" height="428" />
</div>(I don't know how to put html into a box and keep it from processing the html code so I left off the open brackets here...)
This is after the header, so the php for the page is already in place. I just added the image in between the div header> and the div header_right>
Am I missing some php? Should there be a php print in there or something?
Thanks in advance...
Edited by: VeryMisunderstood; Added code tags around HTML

=-=
to keep HTML from being filtered, use code tags
<code>&</code>to fix your image problem, one must know where the image itself is located, chances are high you have the path incorrectly set.
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
That's what I was thinking...
which is why I copied the image to every place imaginable in the litejazz folder, but still nothing. I tried changing to a different image, but it still doesn't show up.
(Thanks for the heads up and the code...will sure make asking questions and helping others easier...lol.)
Could there be something in the template.php that pulls the image files from another folder? Lemme try copying it to drupal/files where my favicon is located and see what happens.
Nope...
didn't work. Dang it meaniehead image!
=-=
When you right click on the broken image placeholder, what is the path being handed back ?
A link to the site would help tremendously.
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
It's returning as...
It's returning the path as: http://www.adoptamodel.com/drupal/admin/build/themes/hatmain2.png
(The site's a work in progress...obviously. So please be gentle...lol.)
Huh?
So should I put a WHOLE file source in there starting with my root folder? That may be a temporary fix until I can figure out what happened....
unless it's getting the source code from php somewhere, in which case that won't help.
=-=
The path to file is http://www.adoptamodel.com/drupal/hatmain2.png
which means its looking inside your drupal install folder. Personally I don't see why you aren't calling this image in from the style.css file where it will then pull the image from the theme folder itself?
otherwise you need to use a relative url all the way to the file itself ie: if the file is in your theme folder
sites/all/themes/litejazz/hatmain.png
the above assumes you correctly installed a contrib theme in the sites/all/themes folder and not in the core themes folder. Contrib themes should be kept seperate which will aid you in updating and upgrading.
if the image is in the misc folder you would use
misc/hatmain.png
if the image is in the files folder
files/hatmain.png
ultimatley you woud use a relative URL from where index.php is located as all things drupal are indeed relative to the index.php file.
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
I see where the confusion is...
..the whole litejazz theme and all of my mods have been in the sites/all/themes/litejazz. I haven't done anything- even changed a single thing in the core themes folder.
I'm not calling from css because I don't want it as a background image. I have four others that will be floated to the right in block style. I thought this way would be easier than creating a region for each pic.
As for being relative to the index.php file...that makes some sense. I thought it would just call from within the folder. Now I learned something....THANK YOU!! (My index.php is in the install and not my root since I'm still in testing mode. Perhaps not the most secure way to do it, but I don't have much for anyone to try and steal or break right now...lol.)
Ok...when
I changed the
<img src="hatmain2.png">to
<img src="http://www.adoptamodel.com/drupal/sites/all/themes/litejazz/hatmain.png">it shows the image. Obviously I'd rather not have to call the images like this so is there a way to fix it or will I just have to deal with it this way? Somewhere, I guess, it's telling Drupal to call the images from admin/build/themes. I really didn't want to mess with the core themes folder, but I guess that's where they need to go?
=-=
I think you need to reread my comment above this one with regard to core and contrib themes.
the relative path to the image per your absolute url is as follows
sites/all/themes/litejazz/hatmain.png
thus:
<img src="sites/all/themes/litejazz/hatmain.png">Though I still think, I'd call this in the style.css since what you are doing seem to be part of the theme layer and not content.
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
I also...
don't want to have to implement any CSS2 calls as I REALLY don't want to have to deal with all the hacks for IE. I know, for example, I could put all of my images in one place with position and z-index using the :before call, but I'd rather write in the whole dang address to the image as opposed to writing hacks and having to check in IE, fixing in IE, etc.
=-=
Maybe I'm blind here, but i don't see where CSS hacks would have to be used to accomplish what you are doing, unless of course you are trying to cover IE 5.5 and before?
either way, I assume, you've managed to get the image to show now using the correct relative url versus the absoulte url.
Good luck with your endeavors.
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
I'm on a Mac...
...and my IE is version 5 for Mac. It didn't work when I used the :before style.
THANK YOU!!
Thank you very, very much for your help!!!