Created
October 16, 2013 07:22
-
-
Save danielpradilla/7003890 to your computer and use it in GitHub Desktop.
Table rows side by side with css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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