Total members 10261 | Gratitudes |It is currently Tue May 22, 2012 3:45 pm Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 1 post ] 
Author Code Snippet
 Code subject: Change background position when mouse over
PostPosted: Sun Dec 04, 2011 2:08 am 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time

Change background position when mouse over, to see the intended idea behind the example below you have to set the images on your root directory.

Code:
<html>
<
head>
<
title>change background position when mouse over.</title>
<
style rel="stylesheet" type="text/css">

.
mainDiv {
  
width800px;
  
floatleft;
  
margin0 0 0 0px;
  
displayinline
}

#part {
  
background-imageurl(site_logo.gif);
  
background-positiontop left;
  
background-repeatno-repeat;
  
width200px;
  
floatleft;
}

#part ul {
  
padding40px 0 0 40px;
  
floatleft;
  
height200px;
}

#part li {
  
list-style-typenone;
  
padding7px 0 5px 0;
  
floatleft;
  
displayinline
}

.
points {
  
background-imageurl(dot.gif);
  
background-positionbottom left;
  
background-repeatno-repeat;
}

#part img {
  
floatleft;
}

#part li a {
  
displayblock;
  
floatleft;
  
background-imageurl(arrow.gif);
  
background-positionbottom right;
  
background-repeatno-repeat;
  
padding0 8px 0 0
}

#part li a:visited {
  
background-positionbottom right
}

#part li a:hover {
  
background-positiontop right
}

#part #active {
  
background-positiontop right
}


</
style>
</
head>
<
body>
    <
div class="mainDiv">
      <
div id="part">
        <
ul>
          <
li class="points"><a href="#" >Link1</a></li>                                                              
          <
li class="points"><a href="#" >Link2</a></li>
          <
li class="points"><a href="#" >Link3</a></li>
          <
li class="points"><a href="#" >Link4</a></li>
          <
li class="points"><a href="#" >Link5</a></li>
          <
li class="points"><a href="#" >Link6</a></li>
        </
ul>
      </
div>
    
    </
div>      
</
body>

</
html>

 

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 1 post ] 
Quick reply


  

 Similar topics
 Mouse position in C++
 Change the shading of object
 Change the border style on mouse over
 X and Y background position
 gradient background color using CSS
 background attachments
 Change the td font style
 change the style of table cells
 Change table style using CSS
 Table with colored background

All times are UTC [ DST ]


Users browsing similar codes

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Code Snippet | Next Code Snippet 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team