The script for rolling over an image and making another appear in its place...
and how would i get css? thank you![]()
This is a discussion on What is the CSS Code/script for rollover images? within the Web Design forums, part of the Web Designing & Development category; The script for rolling over an image and making another appear in its place... and how would i get css? ...
The script for rolling over an image and making another appear in its place...
and how would i get css? thank you![]()
hi
hope this code will help you.
The HTML
Here is the HTML used to create this rollover. You may notice that it is much shorter, and easier to remember than a JavaScript rollover. Essentially, you just need to define a class and everything else is handled with CSS
<div class="rollover">The Style Sheet
<p>
<a href="#"><img src="stuart.gif"
width="32" height="32" border="0"></a>
</p>
</div>
The key to making this work in all modern browsers is to define your links as block elements in your style sheet ( display: block ), and making the width the same as your image’s ( eg. width: 32px ). Choose a background colour for your link that matches your page background and a second colour that you want for the rollover effect ( defined in a:hover ). For example:
<style type="text/css">This will create one rollover image per line. You can then use nested <div> tags, tables, and/or CSS positioning to better control the placement of these rollovers on your page. For a working example, take a look at the left-hand navigation on this site.
<!--
.rollover a { display:block; width:32px; background-color: #FFFFFF}
.rollover a:hover { background-color: #990000}
-->
</style>
thanks
Go for this link http://csscreator.com/node/30193 may be you will get solutions.