+ Reply to Thread
Results 1 to 3 of 3

What is the CSS Code/script for rollover images?

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? ...

Share/Bookmark
  1. #1
    Junior Member Array
    Join Date
    Feb 2008
    Posts
    1

    Default What is the CSS Code/script for rollover images?

    The script for rolling over an image and making another appear in its place...

    and how would i get css? thank you

  2. #2
    Moderator Array orlando's Avatar
    Join Date
    Sep 2008
    Posts
    111

    Default Re: What is the CSS Code/script for rollover images?

    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">
    <p>
    <a href="#"><img src="stuart.gif"
    width="32" height="32" border="0"></a>
    </p>
    </div>
    The Style Sheet


    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">
    <!--
    .rollover a { display:block; width:32px; background-color: #FFFFFF}
    .rollover a:hover { background-color: #990000}
    -->
    </style>
    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.


    thanks

  3. #3
    Senior Member Array akash's Avatar
    Join Date
    Oct 2008
    Location
    Heaven (Earth)
    Posts
    500

    Default Re: What is the CSS Code/script for rollover images?

    Go for this link http://csscreator.com/node/30193 may be you will get solutions.



+ Reply to Thread

Similar Threads

  1. Images for Google Adwords?
    By Martin in forum Google
    Replies: 4
    Last Post: 08-04-2011, 08:39 AM
  2. Replies: 0
    Last Post: 02-09-2008, 03:03 PM
  3. How do you put images on google?
    By .:Ich.Bin.Eine.Engel:. in forum Google
    Replies: 3
    Last Post: 01-12-2008, 02:45 AM
SEO Forum | Web Hosting Forum | Websites For Sale |