Brav Posted May 25, 2010 Share Posted May 25, 2010 I want to make hover images to be in the center. Tried command clear:both; but it does not work. Here is the code for hover: .thumbnail{position: relative;z-index: 0;}.thumbnail:hover{background-color: transparent;z-index: 50;}.thumbnail span{ /*CSS for enlarged image*/position: absolute;background-color: lightyellow;padding: 5px;left: -1000px;border: 1px dashed gray;visibility: hidden;color: black;text-decoration: none;}.thumbnail span img{ /*CSS for enlarged image*/border-width: 0;padding: 2px;}.thumbnail:hover span{ /*CSS for enlarged image on hover*/visibility: visible;top: 125;left: 125px;} Link to comment Share on other sites More sharing options...
thescientist Posted May 25, 2010 Share Posted May 25, 2010 to center inline elements, use text-align: center on the parent element.edit: not sure how it will play out amongst all the positioning you're using, but that's typically the way its achieved. Link to comment Share on other sites More sharing options...
Brav Posted May 26, 2010 Author Share Posted May 26, 2010 It does not work. When i put that way, picture is show all to the left (part of the image can not be seen). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.