问题
Here is my page: http://www.ostmoconstruction.com/portfolio.php
I have decided to change the image onmouseover for each of the images in this small gallery to give a larger preview of images, but when I provide more images more the center and right image, they go outside of the div. Is there anyway to move the middle paragraph to the left onmouseover or something along those lines to keep the whole thing in the div layer?
Is there any way to, when the image changes on the mouseover, move it to the left-hand side of the div layer - to effectively keep it from going outside of the(right side) div layer?
回答1:
Add this styling to the image that shows up on mouseover
position: absolute;
left: 0;
top: 38px;
回答2:
The other answer was almost correct, but I also had to wrap it in a div that had "position: relative;" with it's own negative left-margin. This pushed the other image and it's title outside of view!
You can see the results here: http://www.ostmoconstruction.com/portfolio.php
来源:https://stackoverflow.com/questions/14329533/move-onmouseover-images-to-the-left