Created
February 26, 2014 10:03
-
-
Save adamkdean/9226944 to your computer and use it in GitHub Desktop.
Dynamic widths with CSS
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<style> | |
.container { | |
width: 80%; | |
} | |
.left { | |
float: left; | |
width: 300px; | |
background: blue; | |
} | |
.right { | |
float: left; | |
width: calc(100% - 300px); | |
background: red; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="left"> | |
I am 300 pixels | |
</div> | |
<div class="right"> | |
I am dynamic | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment