CSS: hover over div to animate text-decoration within -


i trying create div when user hovers on link within underlined. right i've been able work if user hovers on link creates animation, trigger animation when hovering on div instead.

could done pure css? or need call javascript?

http://jsfiddle.net/jb9wu/3/

html:

 <div class="module-link">                      <label><a href="job_information.php">job information</a></label>                     <img src="images/project.png"/>                 </div> 

css

.module-link{     font-family: futura-medium, geneva, sans-serif;     font-size:20px;     float:left;     width:108px;     height:180px;     margin:20px;     padding:20px;     background: #cdcdcd;     -webkit-border-radius: 5px;     -moz-border-radius: 5px;     border-radius: 5px;     border:1px solid #b1b1b1;     -webkit-transition: 1s ease;        -moz-transition: 1s ease;         -ms-transition: 1s ease;          -o-transition: 1s ease;             transition: 1s ease; } .module-link:hover {        background: #ededed;        -webkit-transition: 1s ease;        -moz-transition: 1s ease;         -ms-transition: 1s ease;          -o-transition: 1s ease;             transition: 1s ease; } .module-link label{     text-align:center;     font-variant: small-caps;       left:0;        right:0;        margin:auto;        display: block;        margin-bottom: 25px;  } .module-link img{        left:0;        right:0;        margin:auto;        width:100px;        display: block; } .module-link a{     text-decoration:none;     color:#000;     display:inline; } .module-link a:after{     conent: '';     content: '';     display: block;     border-bottom: 1px solid #000;     width: 0;     -webkit-transition: 0.5s ease;             transition: 0.5s ease; } .module-link :hover:after { width: 100%; } 

change last line to:

.module-link:hover a:after { width: 100%; } 

http://jsfiddle.net/jb9wu/4/


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -