adding image to header

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpnewbie26
    New Member
    • Jun 2009
    • 52

    adding image to header

    Hi,

    I've been looking around to find out how to add an image as a header to my page and none of them really seemed to work. I'm wondering if it's something to do with where I placed the image. Mine is a jpeg image. I currently have this for my actual code:

    Code:
    <div class="leftmenu">
    <?php include("header.php"); ?>
    //i was wondering where this header.php is supposed to be as well..
    </div>
    and this is what i have in header.php
    Code:
    <img src="/home/vchan/ts2/logo.jpg"
    width="100" height="50"/>
    I am able to see a white box but not the actual picture. Thanks for the help.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    I guess your server root points to something like /var/www. so the browser will assume that as your root directory. try locate the image through your browser (using http:// not file://). use that path to refer to the image.

    or put the image under the server root directory.

    Comment

    • phpnewbie26
      New Member
      • Jun 2009
      • 52

      #3
      cool! I changed it to the http way and it works. Thanks!=)

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        glad you got it working now. :)

        Comment

        Working...