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