Last active
March 16, 2016 13:32
-
-
Save wang-zhijun/8066877 to your computer and use it in GitHub Desktop.
Split web page vertically in HMTL
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
<html> | |
<head> | |
<style> | |
#column1 { | |
float:left; | |
width: 33%; | |
} | |
#column2 { | |
float:left; | |
width: 33%; | |
} | |
#column3 { | |
float:left; | |
width: 33%; | |
} | |
.floatstop { | |
clear:both; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="column1"> | |
<p>一つ目のコラム</p> | |
</div> | |
<div id="column2"> | |
<p>二つめのコラム</p> | |
</div> | |
<div id="column3"> | |
<p>三つ目のコラム</p> | |
</div> | |
<p class="floatstop">Stop float</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
float:left の意味は文字左寄せじゃなく、コラムまるごと一つ左寄せる。
column2 {
}
のleftをrightにしたら、column2は三つ目のコラムになる