Skip to content

Instantly share code, notes, and snippets.

@motsu0
Last active February 1, 2020 15:33
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 motsu0/83cffb53e19b9760382e531f32edb5fe to your computer and use it in GitHub Desktop.
Save motsu0/83cffb53e19b9760382e531f32edb5fe to your computer and use it in GitHub Desktop.
<!-- 左カラム(固定幅)、右カラム(可変幅) -->
<div class="parent">
parent
<table class="sample1">
<tr>
<td class="lc">吾輩は猫である</td>
<td class="rc">吾輩は猫である。名前はまだ無い。<br>どこで生れたかとんと見当がつかぬ。何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。</td>
</tr>
<tr>
<td class="lc">坊っちゃん</td>
<td class="rc">親譲りの無鉄砲で小供の時から損ばかりしている。小学校に居る時分学校の二階から飛び降りて一週間ほど腰を抜かした事がある。</td>
</tr>
</table>
</div>
<!-- 左カラム(固定幅)、右カラム(残りの幅) -->
<div class="parent">
parent
<table class="sample1 v2">
<tr>
<td class="lc">吾輩は猫である</td>
<td class="rc">吾輩は猫である。<br>名前はまだ無い。</td>
</tr>
<tr>
<td class="lc">坊っちゃん</td>
<td class="rc">親譲りの無鉄砲で小供の時から損ばかりしている。</td>
</tr>
</table>
</div>
.sample1{
border-spacing: 0;
}
.sample1 .lc{
width: 8.5em;
}
.sample1.v2{
width: 100%;
}
.sample1.v2 .lc{
vertical-align: top;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment