Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a href="#"><img src="image.png" /></a> ==> this should not have a bottom-border on hover
- <a href="#">regular text link</a> ==> this should have a bottom-border on hover
- #sidebar a:hover {
- border-bottom: 1px dotted red;
- }
- #sidebar a:hover img {
- border-bottom: none;
- }
- #sidebar a:hover { text-decoration: underline; }
- #sidebar a:hover img { text-decoration: none; }
- a img {position:relative; top: Npx}, where N is the hover border thickness
- $('#sidebar a:has(img)').addClass('image-link');
- #sidebar a:hover {
- border-bottom: 1px dotted red;
- }
- #sidebar a.image-link:hover {
- border-bottom: none;
- }
- $text = preg_replace('#<a(.*?)<img(.*?)/>(.*?)</a>#is', "<a class='imgshow' \1 <img\2 />\3</a>", $text);
Add Comment
Please, Sign In to add comment