Description: The following code snippet is used on Android / iPhone for Roundabout carousel. Each LI is 100px x 100px in width and height. And the link is the top of the LI.
<div data-role="content" data-theme="aa"> <ul class="roundabout-holder"> <li class="roundabout-moveable-item"> <a href="<%= url_for :action => :graph %>"> <%= label_for:link %></a></li> <li class="roundabout-moveable-item"> <a href="<%= url_for :action => :graph %>"> <%= label_for:link %></a></li> <li class="roundabout-moveable-item"> <a href="<%= url_for :action => :graph %>"> <%= label_for:link %></a></li> <li class="roundabout-moveable-item"> <a href="<%= url_for :action => :graph %>"> <%= label_for:link %></a></li> <li class="roundabout-moveable-item"> <a href="<%= url_for :action => :graph %>"> <%= label_for:link %></a></li> </ul> </div>
CSS
.roundabout-holder { list-style: none; width: 75%; height: 10em; margin: 1em auto; } .roundabout-moveable-item { height: 100px; width: 100px; border: 1px dotted #999; background-color: #f3f3f3; font-size: 2em; cursor: pointer; }
Current behavior : In elements Anchor behaves only as a link (go to the specified link)
Expected behavior: When the user clicks on the LI, he must go to the specified link.
Relative resource from stackoverflow
How to create the whole area of ββa list item in my navigation bar by clicking on the link?
Make Clickable List Item (HTML / CSS)
An eventhough solution fits my problem. I need to find a general solution. Because I canβt install the add-on for everyone in one or one after the other, because the link label may change from time to time.
Added and checked as indicated display:inline-block; and padding , then the problem is sorted, but from time to time should be changed.
source share