html - Are there any differences in browser support for <a> link ellement using display: block; -


i wondering if there differences between following 3 buttons. , if there any, how browsers handle them, including area clickable?

on website made, removed link buttons "my-button-1" example , added class element self, "my-button-2" example. using display block. after saw drop in page-views/clicks etc..

is there differences older browsers, when using link element display block?

<a href="http://example.com">     <div class="my-button-1">         click here     </div> </a>  <a href="http://example.com" class="my-button-2">     click here </a>  <div class="my-button">     <a href="http://example.com">         click here     </a> </div>  .my-button-1 {     background-color: yellow;     height: 50px;     width: 200px; }  a.my-button-2 {     display: block;     background-color: yellow;     height: 50px;     width: 200px; }  .my-button-3 {     display: block;     background-color: yellow;     height: 50px;     width: 200px; } 

there should no difference in older browsers. display property , block value , have been supported.

in case, don't need inner div , can apply css directly 2nd example.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -