Javascript Image Script..can anyone help me out?
Results 1 to 6 of 6

Thread: Javascript Image Script..can anyone help me out?

  1. #1
    Senior Member
    Join Date
    Apr 2003
    Posts
    109

    Javascript Image Script..can anyone help me out?

    Hi there people, im building a site, and i would like to place an image anywere i whant it on the site..let me see if i can explain it clear here:

    -------------
    y
    x

    -------------

    imagine that was the web site, i whanted to place the image over evrything else, for ex:

    http://www.xbox.com/pt-pt/ninjagaiden/default.htm on that, i whanted to put that ninja image on that "X" spot in the site, over the text or other images.

    Is there any JavaScript or something avaiable for that? ah, and i didnt whanted one that the ppl could move with the mouse or that i moves along or something, i whant one that only displays the image were i whant, ex, on the X or Y spot.

    Thanx ppl!!
    Owmen

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Posts
    227

    Post use css

    You can simply use css. For example you would have <img id='ninja' src='... and in your css you would have something like img#ninja{position:absolute;top:55px;left:55px;z-index:5;}. Of course instead of positon:absolute you can use positon:relative, instead of top use bottom, instead of left use right etc. etc.. You can find more about css here.
    http://promote.opera.com/small/opera94x15.gif

    [gloworange]Sun7dots[/gloworange]

  3. #3
    Senior Member
    Join Date
    Apr 2003
    Posts
    109
    I just woke up now :P

    Thanks, iŽll do just that and see if i manage to get this done

    Thanks for the tip

    Cheers
    Owmen

  4. #4
    Senior Member
    Join Date
    Apr 2003
    Posts
    109
    <style type="text/css">

    img#zelda {
    position:absolute;
    right:10px;
    z-index:3;
    }

    </style>
    <img id="zelda" src="Image5.gif">

    This is the css code i have, it works for put the image static on the right side of the page, so far so good, but i what to put the image a little bit bellow on the page, but if i ad this:

    <style type="text/css">

    img#zelda {
    position:absolute;
    bottom:10px;
    right:10px;
    z-index:3;
    }

    </style>
    <img id="zelda" src="Image5.gif">

    ..the image moves when the page scrolls..and i just whant it to be static were i whant it to be, not scrolling along the rest.

    On that code, how can i ad something to allow me to move it verticaly but still remain static?
    Owmen

  5. #5
    Senior Member
    Join Date
    Apr 2003
    Posts
    109
    FOUND IT!!!

    <style type="text/css">

    img#zelda {
    position:absolute;
    top:123px;
    right:20px;
    z-index:3;
    }

    </style>
    <img id="zelda" src="Image5.gif">


    Im no expert, ( not even for milles ) but im glad iv found it by myself!

    But i have to thank u Sun 7Dots for the precious tip , THANX alot!!!

    Cheers
    Owmen

  6. #6
    Senior Member
    Join Date
    Jan 2002
    Posts
    227
    I should be faster But good for you, you have found it yourself!
    http://promote.opera.com/small/opera94x15.gif

    [gloworange]Sun7dots[/gloworange]

Posting Permissions

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