Skip to content

Instantly share code, notes, and snippets.

@liranfar
Last active March 23, 2018 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liranfar/0593993fe8bd059a07b96dbb47b14bd8 to your computer and use it in GitHub Desktop.
Save liranfar/0593993fe8bd059a07b96dbb47b14bd8 to your computer and use it in GitHub Desktop.
empty divs divided by percentage
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Empty divs divided by percentage</title>
<link rel="stylesheet" href="style.css">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div id="divOne">
</div>
<div id="divTwo">
</div>
<div id="divThree">
</div>
</body>
</html>
body,html {
height: 100%;
margin:0;
}
#divOne{
border: 2px red solid;
height: 40%;
}
#divTwo{
border: 2px green solid;
/* The image used */
height: 30%;
}
#divThree{
border: 2px blue solid;
/* The image used */
height: 30%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment