| | |
hover background image
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
i designed some images to put in the navbar... the idea was putting them so that when they're hovered, there is an image change to another image with bthe same design but different colors...
when i pretended to do this i found a serious problem... if i insert the image in the html, there's no way i can change it unless i use javascript (and i'm trying to avoid the excess of javascript)... if i put it as a table background, specifying the cell's width and height, nothing happens, it doesn't even place the image... if i use it as a hyperlink background, the image will be resized to the space needed by the text in the hyperlink...
so, as you can see, i'm in a bit of a problem... i hope you get the idea of what i want to do...
anyone knows how to solve it?
when i pretended to do this i found a serious problem... if i insert the image in the html, there's no way i can change it unless i use javascript (and i'm trying to avoid the excess of javascript)... if i put it as a table background, specifying the cell's width and height, nothing happens, it doesn't even place the image... if i use it as a hyperlink background, the image will be resized to the space needed by the text in the hyperlink...
so, as you can see, i'm in a bit of a problem... i hope you get the idea of what i want to do...
anyone knows how to solve it?
-->sometimes i wanna take my toaster in a bath<-- Hi there,
Try This Code this May Help you
CSS:
HMTL:
Regards,
Rahul Dev Katarey
Try This Code this May Help you

CSS:
HTML and CSS Syntax (Toggle Plain Text)
<style type="text/css"> .links { font-family:Verdana, Arial, Helvetica, sans-serif; display:block; /*This Cover Full TD */ background:url(link.png) center top no-repeat; /*This Will Set the Link background */ height:25px; /*This Will Make Fixes Size Link (Use Image height)*/ width:100px; /*This Will Make Fixes Size Link (Use Image width)*/ line-height:25px; text-align:center; font-size:10pt; text-decoration:none; } .links:hover { background:url(hover-link.png) center top no-repeat; } </style>
HTML and CSS Syntax (Toggle Plain Text)
<table width="100" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#" class="links">Link</a></td> </tr> </table>
Regards,
Rahul Dev Katarey
•
•
Join Date: Oct 2008
Posts: 89
Reputation:
Solved Threads: 4
katarey have solved ur problem through css nicely!!! u can avoid to much javascript by using simple roll over option in the dreamweaver i guess. do give it a try to
![]() |
Similar Threads
- javascript css background-image (JavaScript / DHTML / AJAX)
- CSS question regarding hover images (HTML and CSS)
- css class:hover (HTML and CSS)
- css background image problem (HTML and CSS)
- Background question (JavaScript / DHTML / AJAX)
- Background image flickers in IE.... (JavaScript / DHTML / AJAX)
Other Threads in the HTML and CSS Forum
- Previous Thread: Building a CSS Public WWW Domain.
- Next Thread: IE 7 rendering only on client's two computers!
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






