Created
June 30, 2015 14:58
-
-
Save nleush/ab375976eb9e6de4d849 to your computer and use it in GitHub Desktop.
Centering responsive 100% width block with width contraint.
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> | |
.centering-fullwidth { | |
width: 100%; | |
} | |
.constraint-container { | |
width: 500px; | |
margin: auto; | |
} | |
</style> | |
<!-- full width centering container --> | |
<div class="centering-fullwidth"> | |
<!-- 500px width constraint --> | |
<div class="constraint-container"> | |
<!-- start responsive content --> | |
<div style="width: 100%; background: black; height: 400px;"></div> | |
<!-- end responsive content --> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment