Skip to content

Instantly share code, notes, and snippets.

@mvargasmoran
Created August 29, 2014 23:23
Show Gist options
  • Save mvargasmoran/82fd6ea86399b57c42ae to your computer and use it in GitHub Desktop.
Save mvargasmoran/82fd6ea86399b57c42ae to your computer and use it in GitHub Desktop.
anchors fill its father, so its easier on mobile // source http://jsbin.com/rediti/1
<!DOCTYPE html>
<head>
<meta name="description" content="anchors fill its father, so its easier on mobile" />
<title></title>
<style id="jsbin-css">
.std {
width: 200px;
border: solid 1px green;
height: 50px;
}
.std a {
display: inline-block;
height:100%; width:100%;
}
.std a:hover {
background-color: yellow;
}
</style>
</head>
<body>
<table>
<tbody>
<tr>
<td class="std">
<a href="http://www.google.com/">Cell 1<br>
second line</a>
</td>
<td class="std">
<a href="http://www.google.com/">Cell 2</a>
</td>
<td class="std">
<a href="http://www.google.com/">Cell 3</a>
</td>
<td class="std">
<a href="http://www.google.com/">Cell 4</a>
</td>
</tr>
</tbody>
</table>
<script id="jsbin-source-css" type="text/css">
.std {
width: 200px;
border: solid 1px green;
height: 50px;
}
.std a {
display: inline-block;
height:100%; width:100%;
}
.std a:hover {
background-color: yellow;
}
</script>
</body>
</html>
.std {
width: 200px;
border: solid 1px green;
height: 50px;
}
.std a {
display: inline-block;
height:100%; width:100%;
}
.std a:hover {
background-color: yellow;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment