Total members 11778 |It is currently Wed Jun 19, 2019 11:52 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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>
 





Author:
Mastermind
User avatar Posts: 2707
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  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 table style using CSS     -  
 Change the td font style     -  
 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, HTML Div, CSS Border






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com