Never been to TextSnippets before?

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 (or not, you can keep them private!)

Cross-browser solution for adding hover border to linked images (See related posts)

// The class is assigned to the href.

.borderit img {
        border: 1px dashed #776e09;
        padding: 2px;
}
.borderit:hover img {
        border: 1px solid #fff71c;
        padding: 2px;
}
.borderit:hover {
        color: red; /* irrelevant definition to overcome IE bug */
}

You need to create an account or log in to post comments to this site.


Related Posts