Jump to content

Hover position


Brav
 Share

Recommended Posts

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

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.

Edited by thescientist
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...