css - Making entire list item clickable in HTML5 -


im creating mobile app html5, backbone.js, phonegap , topcoat.io. want make entire list items clickable. @ moment have:

<ul class="topcoat-list">       <li class="topcoat-list__item">          <a href="#teams">teams</a>     </li>      <li class="topcoat-list__item">          <a href="#games/1">upcoming fixtures</a>      </li>  </ul> 

but user needs touch "teams" rather anywhere on list item. make whole list item clickable, wrap in anchor tags:

    <a href="#teams">         <li class="topcoat-list__item">              teams         </li>     </a>      <a href="#games/1">         <li class="topcoat-list__item">          upcoming fixtures         </li>     </a> 

is right approach? works, seems dirty...

display anchor block.

ul,li {    list-style: none;    margin: 0;    padding: 0; } {    display: block;    width: 100%;    height: 100%; } 

also, check fiddle.

you can add height/ width or padding make links bigger.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -