DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Cool Image Border

04.28.2007
| 3058 views |
  • submit to reddit
        // This is a cool image border to add some background to the image and the border

.photo {
	text-align: center;
	padding: 2px;
	border: 2px #006600 solid; 
}	

.photo:hover {
	border: 2px #003366 solid; 
}	
    

Comments

Snippets Manager replied on Wed, 2007/05/02 - 6:15pm

This css snippet worked fine Firefox but it did not work in IE 7. It displays the border around the image but no hover effect at all.