Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>How about using a <code>label</code>? That way you get the functionality of the button, but the visibility of the label. Tested in Firefox and Chrome. Updated example for form submission.</p> <ul> <li>No JavaScript is involved with the clickability of the cell region</li> <li>Works without a fixed height on the container</li> <li>Works when a different cell has a larger height than the one with the button</li> <li>Works with multiple button cells</li> </ul> <p><strong>HTML:</strong></p> <pre><code>&lt;form onsubmit="alert(); return false;"&gt; &lt;div class="container"&gt; &lt;div class="item"&gt;1&lt;/div&gt; &lt;div class="item"&gt;2&lt;/div&gt; &lt;div class="item"&gt;3&lt;/div&gt; &lt;/div&gt; &lt;div class="container"&gt; &lt;div class="item"&gt;4&lt;/div&gt; &lt;div class="item"&gt;5&lt;br&gt;&lt;br&gt;&lt;br&gt;Extended cell&lt;/div&gt; &lt;label class="item"&gt;Button 1&lt;button type="submit"&gt;&lt;/button&gt;&lt;/label&gt; &lt;label class="item"&gt;Button 2&lt;button type="submit"&gt;&lt;/button&gt;&lt;/label&gt; &lt;/div&gt; &lt;/form&gt; </code></pre> <p><strong>CSS:</strong></p> <pre><code>.container { margin: 10px; border: 5px solid blue; display: table; table-layout: fixed; width: 300px; } .item { border: 3px solid red; display: table-cell; } .item button { background-color: transparent; position: absolute; left: -1000px; height: 1px; width: 1px; overflow: hidden; } </code></pre> <p><a href="http://jsfiddle.net/SombreErmine/MPDqL/14/">JSFiddle here.</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload