Switch to full style
CSS code examples
Post a reply

Change the border style on mouse over

Tue Feb 28, 2012 12:17 am

In this example we change the background color and border style on mouse over for div tag using javascript.

Code:

    
<html>
<
head>
<
title>Change the border style on mouse over.</title>
<
style>
div.DivOne 
    
border:5px solid #cccccc; 
    
border-style:dashed
    
color:#FF99FF;
    
font-weight:bold;
    
background-color:#989898;
    
width:230px;
    
height:100
}
div.DivTwo 
    
border:"none"
    
color:#FF99FF;
    
font-weight:bold;
    
background-color:#546445;
    
width:230px;
    
height:100
}
</
style>
</
head>
<
body>
Change the border style on mouse over.
<
div class="DivTwo" 
     
     
onmouseover="this.className='DivOne'"
     
onmouseout="this.className='DivTwo'">
     
Your div text here
</div>
</
body>
</
html>
 




Post a reply
  Related Posts  to : Change the border style on mouse over
 change border style to solid at div tag     -  
 change the style of the kbd     -  
 Change the td font style     -  
 Change table style using CSS     -  
 Change the border color of image and its link     -  
 change the font style of the body tag     -  
 Change background position when mouse over     -  
 change the style of table cells     -  
 Change the default underline style of link     -  
 Change the mouse cursor to hand pointer     -  

Topic Tags

CSS Background, CSS Border, HTML Div