Skip to content

Instantly share code, notes, and snippets.

@rodp
Created July 28, 2012 16:17
Show Gist options
  • Save rodp/3193888 to your computer and use it in GitHub Desktop.
Save rodp/3193888 to your computer and use it in GitHub Desktop.
Answer to a challenge on NYC: http://news.ycombinator.com/item?id=4305508
<!doctype html>
<html>
<head>
<title>Challenge</title>
<style>
* { margin: 0; padding: 0; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
header, article, footer { position: absolute; left: 0; width: 100%; border: solid 1px red; }
header { top: 0; height: 20px; }
footer { bottom: 0; height: 20px; }
article { top: 20px; bottom: 20px; height: auto; }
form, aside { position: absolute; top: 0; bottom: 0; width: 50%; border: solid 1px red; }
form { left: 0; }
aside { right: 0; }
textarea { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: solid 1px blue; }
</style>
</head>
<body>
<header>Header</header>
<article>
<form><textarea>Textearea</textarea></form>
<aside>Aside</aside>
</article>
<footer>Footer</footer>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment