Move onmouseover images to the left?

半世苍凉 提交于 2019-12-04 05:37:22

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!