Created
September 29, 2016 17:43
-
-
Save leepettijohn/7e06a2fe21307f73e0d3f379f2685077 to your computer and use it in GitHub Desktop.
Center div between two different sized divs
This file contains hidden or 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> | |
| div{height:100px} | |
| .left{float:left; width:100px;} | |
| .right{float:right; width:300px;} | |
| .middle-wrap{overflow:hidden} | |
| .middle{margin:0 auto; width:50px} | |
| </style> | |
| <div class="left"></div> | |
| <div class="right"></div> | |
| <div class="middle-wrap"> | |
| <div class="middle"></div> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment