Last active
August 29, 2015 14:17
-
-
Save okuden-labo/d44b2b194d14fc99926e to your computer and use it in GitHub Desktop.
Bootstrap Containerのサイズをカスタムする方法[改訂版]
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
/* 通常のcontainerが750px-970px-1170pxなのでsmallの間にmiddeleを追加 */ | |
@media (min-width: 768px) { | |
.container-small { | |
width: 300px; | |
} | |
.container-middle { | |
width: 500px; | |
} | |
} | |
@media (min-width: 992px) { | |
.container-small { | |
width: 500px; | |
} | |
.container-middle { | |
width: 700px; | |
} | |
} | |
@media (min-width: 1200px) { | |
.container-small { | |
width: 700px; | |
} | |
.container-middle { | |
width: 900px; | |
} | |
} | |
/* 作成したカスタムコンテイナーがウィンドウ幅からはみ出ないように調整*/ | |
.container-small, | |
.container-middle { | |
padding-right: 15px; | |
padding-left: 15px; | |
margin-right: auto; | |
margin-left: auto; | |
max-width: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment