Nobody seems to understand my question

Sundaysbest0

New Member
Reaction score
0
Okay here it goes. I have link A and picture A. When i scroll over link A I need picture A to change to picture B. When my mouse is no longer hovering over picture B I need it to change back to picture A.

Can somebody please show me the light?
 

Vestras

Retired
Reaction score
248
Code:
<html>
<head>
    <script type="text/javascript">
        function OnLinkMouseOver() {
            document.getElementById("picture").src = "newImgSrc.jpg";
        }

        function OnLinkMouseOut() {
            document.getElementById("picture").src = "oldImgSrc.jpg";
        }
    </script>
</head>
<body>
    <img alt="" src="somesrc.jpg" id="picture" />
    <a href="somepage.htm" onmouseover="OnLinkMouseOver()" onmouseout="OnLinkMouseOut()">Link</a>
</body>
</html>
 

Sundaysbest0

New Member
Reaction score
0
now that link is at the bottem of the page. I want to put it at a specific set of coordinates. how do i move it?
 

Vestras

Retired
Reaction score
248
well then how would i go about getting that link in a certain spot?

By for example having a content div filling the main page and a footer div containing the link. If you set the content div's height to a certain amount in your css, you should see that the footer div gets positioned at the bottom.
 

Sundaysbest0

New Member
Reaction score
0
i didint understand that at all. here, i dont know how nice you are haha but this is what i need done. I need ipod.jpg to have a link where the menu button is and then i need another link where the next button is and when you scroll over the next button the image changes to ipod2.jpg

those are the files
 

Attachments

  • iPod.JPG
    iPod.JPG
    37 KB · Views: 277
  • iPod2.JPG
    iPod2.JPG
    37.3 KB · Views: 522

ertaboy356b

Old School Gamer
Reaction score
86
You need to do some CSS..

First you put the link on a div..

Code:
<div id="thisisme"><a href="link"><img src="img" /></a></div>

Now, you do some css..

At the <head> section, write this:

Code:
<style>
#thisisme { position: absolute; display: inline; top: <pixels from top>; left: <pixels from left>; }
</style>

modify the value of top and left that suits your needs. Also you may change top to bottom or left to right. if you want it fix, like when you scroll the screen the picture won't move, then change position to fixed.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Code:
<html>
<head>
    <script type="text/javascript">
        function OnLinkMouseOver() {
            document.getElementById("picture").src = "newImgSrc.jpg";
        }

        function OnLinkMouseOut() {
            document.getElementById("picture").src = "oldImgSrc.jpg";
        }
    </script>
</head>
<body>
    <img alt="" src="somesrc.jpg" id="picture" />
    <a href="somepage.htm" onmouseover="OnLinkMouseOver()" onmouseout="OnLinkMouseOut()">Link</a>
</body>
</html>



CSS does this better.
Just use :hover.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Ah.
Seems I misunderstood the problem. My bad.
 

Drenferalis

New Member
Reaction score
0
Code:
.changeme:hover {css to change picture}
.changeme .dontchangeme:hover {css that doesnt change but still changes changeme on hover}


BUT i don't suggest using :hover as there are many Internet Browsers that dont support it very well. Like IE... Then you have to get css hacks, etc.
 

codemonkey

Code monkey not crazy, just proud.
Reaction score
66
Code:
.changeme:hover {css to change picture}
.changeme .dontchangeme:hover {css that doesnt change but still changes changeme on hover}


BUT i don't suggest using :hover as there are many Internet Browsers that dont support it very well. Like IE... Then you have to get css hacks, etc.

You did not show what I asked. Please use a complete HTML document and that just seems like basic CSS to me.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top