www.webdeveloper.com
Results 1 to 6 of 6

Thread: How do I put my logo on every page

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Posts
    3

    How do I put my logo on every page

    I am a newbie to web design, and have started to design a site for my wife's business. I am using the osCommerce opensource software, and want to place our logo at the head of each page.

    Is there an easy way to do this, or do I need to go into each file and edit it?

    Many thanks.

  2. #2
    Join Date
    Nov 2002
    Location
    Hermantown, MN
    Posts
    1,777
    oh with OS there is one file you need to edit where at the footer you can put in what you like. I suggest doing text and not an image btw... any sized image will end up looking funny or odd on the page.

  3. #3
    Join Date
    Apr 2003
    Location
    Rosemount, MN
    Posts
    2,287
    you could place the image in an external js file. like so:

    Code:
    // Set up the image files to be used.
    var theImages = new Array() // do not change this
    // To add more image files, continue with the
    // pattern below, adding to the array.
    
    theImages[0] = 'images/title.png'
    
    
    // do not edit anything below this line
    
    var j = 0
    var p = theImages.length;
    var preBuffer = new Array()
    for (i = 0; i < p; i++){
       preBuffer[i] = new Image()
       preBuffer[i].src = theImages[i]
    }
    var whichImage = Math.round(Math.random()*(p-1));
    function showImage(){
    document.write('<img src="'+theImages[whichImage]+'">');
    }
    If you have more than one image, that you want to randomly appear when page is refreshed, add this:
    theImages[1] = 'images/title1.png'
    theImages[2] = 'images/title2.png'

    and just keep continuing with the pattern, you can use one image if you want though.

    now when you want the image to appear, add this code to that spot in the html doc or PHP, or what ever.
    Code:
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    showImage();
    //  End -->
    </script>
    Last edited by The Little Guy; 10-04-2005 at 01:08 PM.

  4. #4
    Join Date
    Oct 2005
    Posts
    3

    How do I put my logo on every page

    Compguy Pete - is the file the stylesheet file?

    Thanks.
    Bob

  5. #5
    Join Date
    Oct 2005
    Posts
    3

    How do I put my logo on every page

    Little Guy. I recognise this as javascript, but do not know how it hangs together. Which parts of your script do I need to edit?

    Thanks.
    Bob

  6. #6
    Join Date
    Apr 2003
    Location
    Rosemount, MN
    Posts
    2,287
    all you need to edit is this:

    theImages[0] = 'images/title.png'

    Just change "images/title.png" to the image you are using

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles