Skip to content

Instantly share code, notes, and snippets.

@danielpradilla
Created October 16, 2013 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpradilla/7003890 to your computer and use it in GitHub Desktop.
Save danielpradilla/7003890 to your computer and use it in GitHub Desktop.
Table rows side by side with css
<style>
table{
width:100%;
}
table tr {display:inline}
table tr:nth-child(1){
position:relative;
}
table tr:nth-child(1) td{
position:absolute;
top:100%;
left:0;
}table tr:nth-child(2){
display:block;
width:50%;
margin-left:50%;
}
</style>
<table>
<tr>
<td>First Row</td>
</tr>
<tr>
<td>Second Row</td>
</tr>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment