March 22, 201115 yr Hi, Everytime i hover over the link the background image disappears, it seems to work ok in a blank template though! - Here is the link: - www dot myweddingreviews.co.uk/sample-advertising-packages/gold-package-example dot html <html> <head> <style type="text/css"> .searchActionLinks{background-image:url('actionLinks.png');background-repeat:no-repeat;display:inline-block;margin-left:3px;padding-left:18px;} .search-contactus:hover{background-position:0 -34px;} .search-contactus{background-position:0 0;} .search-website:hover{background-position:0 -170px;} .search-website{background-position:0 -136px;} .search-save:hover{background-position:0 -102px;} .search-save{background-position:0 -68px;} </style> </head> <body> <div> <a class="search-contactus searchActionLinks" href="#">Contact Us</a> <a class="search-website searchActionLinks" href="#">Website</a> <a class="search-save searchActionLinks" href="#">Save</a> </div> </body> </html> Hope you guys can help. Cheers
March 22, 201115 yr Author the image is a sprite and its transparent in between each icon. This is my first sprite, so im a newbie at this.
March 22, 201115 yr Changed my mind lol I'm a bit rusty at the moment try adding the a to the rule a.searchActionLinks{} that should stop it being overwritten Its because of your a:hover ,a:visited {background:inherit;} Edited March 22, 201115 yr by mteam
March 22, 201115 yr Author tried that mate, still doing the same thing, just showing white or the hover disappearing. Not tried the change i emailed you about, ive been moved onto some work thats got a deadline of end of this month so hopefully will get chance to look at it in more detail then. Thanks again.
March 22, 201115 yr No sorry I didn't explain properly you need to add the a to your existing rule a.searchActionLinks { background-image: url("images/actionLinks.png"); background-repeat: no-repeat; display: inline-block; margin-left: 3px; padding-left: 18px; } not just a.searchActionLinks {/* I should have shown your existing code here*/} Edited March 22, 201115 yr by mteam
March 23, 201115 yr Author That works mate, ive tried in in Chrome developer tools - but ill add it to the css when i get home. Thanks for your help AGAIN! :-)
Create an account or sign in to comment