html - CSS - Style the title from the image tag -


i'm trying style title image tag.

i have search other question can´t put working in project.

but can´t make changes.

someone can give me hand pls?

my code:

table.tablesorter tbody tr td a:hover img[title]:after  {  	content: attr(title);  	padding: 4px 8px;  	color: #fff;  	background-color:black;  }
<table class="tablesorter" style="width:98% !important">      <thead>          <tr>              <th>                 .....              </th>          </tr>      </thead>    	<tbody>                          <tr>                  <td>                     ..........                  </td>                 	<td>                      <a href="@url.action("edit","account", new { id=item.userid })">                          <img src="~/content/images/icon_edit.png" title="edit"/>                      </a>                 </td>    			</tr>      </tbody>    	<tfooter>  	</tfooter>  </table>

it should content: attr(title);, not content: attr(data-title); - don't have data attribute.

also, seems ::before , ::after pseudo-elements not defined img - may have use else:
css content attribute img tag

working example (when image missing): http://jsfiddle.net/dmafm/
example, title on <a> tag: http://jsfiddle.net/dmafm/1/


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -