Created
May 7, 2011 23:49
-
-
Save charliepark/960976 to your computer and use it in GitHub Desktop.
An experiment with different font sizes and relative positioning, in order to get good baselines. Key takeaway: line-height + margin-bottom of each headline should equal the line-height + margin-bottom of the h1; also, each headline's position:relative;to
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> | |
<head> | |
<meta charset="utf-8"> | |
<title>Page Title</title> | |
<style type="text/css" media="screen"> | |
/* from Eric Meyer: v2.0b1 | 201101 */ | |
a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, body, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt, em, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu, nav, object, ol, p, pre, q, s, samp, section, small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr, tt, u, ul, var, video{border:0;font:inherit;font-size:100%;margin:0;outline:0;padding:0;vertical-align:baseline} | |
/* HTML5 display-role reset for older browsers */ | |
article, aside, details, figcaption, figure, | |
footer, header, hgroup, menu, nav, section{display:block} | |
body{line-height:1} | |
ol, ul{list-style:none} | |
blockquote, q{quotes:none} | |
blockquote:before, blockquote:after, q:before, q:after{content:'';content:none} | |
ins{text-decoration:none} | |
del{text-decoration:line-through} | |
table{border-collapse:collapse;border-spacing:0} | |
/* end of Eric Meyer's CSS Reset */ | |
body, input, select, textarea{font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:11px;line-height:20px} | |
h1, h2, h3, h4, h5, h6, p {border-bottom:1px solid #000;display:inline-block;font-weight:bold;opacity:.3;padding:0 10px;position:relative;width:100%;} | |
h1{font-size:35px;line-height:40px;top:0px;margin-bottom:0;border-color:red;} | |
h2{font-size:30px;line-height:36px;top:4px;margin-bottom:4px;border-color:orange;} | |
h3{font-size:25px;line-height:32px;top:8px;margin-bottom:8px;border-color:yellow;} | |
h4{font-size:20px;line-height:28px;top:12px;margin-bottom:12px;border-color:green;} | |
h5{font-size:15px;line-height:25px;top:15px;margin-bottom:15px;border-color:blue;} | |
h6{font-size:10px;line-height:21px;top:19px;margin-bottom:19px;border-color:indigo;} | |
p{font-size:12px;line-height:40px;top:0px;border-color:violet;} | |
div{float:left;width:10px;} | |
</style> | |
</head> | |
<body> | |
<div style="display:none"> | |
<p> | |
Paragraphs aren't really working right. In fact, much of this is plain screwy. | |
</p> | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
</p> | |
</div> | |
<div> | |
<h1>h1</h1><br /> | |
<h2>h2</h2><br /> | |
<h3>h3</h3><br /> | |
<h4>h4</h4><br /> | |
<h5>h5</h5><br /> | |
<h6>h6</h6><br /> | |
</div> | |
<div> | |
<h2>h2</h2><br /> | |
<h3>h3</h3><br /> | |
<h4>h4</h4><br /> | |
<h5>h5</h5><br /> | |
<h6>h6</h6><br /> | |
<h1>h1</h1><br /> | |
</div> | |
<div> | |
<h3>h3</h3><br /> | |
<h4>h4</h4><br /> | |
<h5>h5</h5><br /> | |
<h6>h6</h6><br /> | |
<h1>h1</h1><br /> | |
<h2>h2</h2><br /> | |
</div> | |
<div> | |
<h4>h4</h4><br /> | |
<h5>h5</h5><br /> | |
<h6>h6</h6><br /> | |
<h1>h1</h1><br /> | |
<h2>h2</h2><br /> | |
<h3>h3</h3><br /> | |
</div> | |
<div> | |
<h5>h5</h5><br /> | |
<h6>h6</h6><br /> | |
<h1>h1</h1><br /> | |
<h2>h2</h2><br /> | |
<h3>h3</h3><br /> | |
<h4>h4</h4><br /> | |
</div> | |
<div> | |
<h6>h6</h6><br /> | |
<h1>h1</h1><br /> | |
<h2>h2</h2><br /> | |
<h3>h3</h3><br /> | |
<h4>h4</h4><br /> | |
<h5>h5</h5><br /> | |
</div> | |
<div> | |
<h4>h4</h4><br /> | |
<h5>h5</h5><br /> | |
<h1>h1</h1><br /> | |
<h2>h2</h2><br /> | |
<h5>h5</h5><br /> | |
<h5>h5</h5><br /> | |
</div> | |
<div> | |
<h6>h6</h6><br /> | |
<h5>h5</h5><br /> | |
<h4>h4</h4><br /> | |
<h2>h2</h2><br /> | |
<h2>h2</h2><br /> | |
<h4>h4</h4><br /> | |
</div> | |
<div> | |
<h3>h3</h3><br /> | |
<h5>h5</h5><br /> | |
<h3>h3</h3><br /> | |
<h5>h5</h5><br /> | |
<h4>h4</h4><br /> | |
<h2>h2</h2><br /> | |
</div> | |
<div> | |
<h5>h5</h5><br /> | |
<h4>h4</h4><br /> | |
<h5>h5</h5><br /> | |
<h4>h4</h4><br /> | |
<h2>h2</h2><br /> | |
<h1>h1</h1><br /> | |
</div> | |
<div> | |
<h3>h3</h3><br /> | |
<h3>h3</h3><br /> | |
<h3>h3</h3><br /> | |
<h1>h1</h1><br /> | |
<h4>h4</h4><br /> | |
<h6>h6</h6><br /> | |
</div> | |
<div> | |
<h6>h6</h6><br /> | |
<h3>h3</h3><br /> | |
<h2>h2</h2><br /> | |
<h6>h6</h6><br /> | |
<h4>h4</h4><br /> | |
<h1>h1</h1><br /> | |
</div> | |
<div> | |
<h1>h1</h1><br /> | |
<h6>h6</h6><br /> | |
<h3>h3</h3><br /> | |
<h6>h6</h6><br /> | |
<h1>h1</h1><br /> | |
<h1>h1</h1><br /> | |
</div> | |
<div> | |
<h4>h4</h4><br /> | |
<h6>h6</h6><br /> | |
<h2>h2</h2><br /> | |
<h4>h4</h4><br /> | |
<h6>h6</h6><br /> | |
<h5>h5</h5><br /> | |
</div> | |
<div> | |
<h3>h3</h3><br /> | |
<h4>h4</h4><br /> | |
<h1>h1</h1><br /> | |
<h5>h5</h5><br /> | |
<h2>h2</h2><br /> | |
<h4>h4</h4><br /> | |
</div> | |
<div> | |
<h1>h1</h1><br /> | |
<h4>h4</h4><br /> | |
<h5>h5</h5><br /> | |
<h1>h1</h1><br /> | |
<h1>h1</h1><br /> | |
<h2>h2</h2><br /> | |
</div> | |
<div> | |
<h2>h2</h2><br /> | |
<h6>h6</h6><br /> | |
<h3>h3</h3><br /> | |
<h2>h2</h2><br /> | |
<h3>h3</h3><br /> | |
<h1>h1</h1><br /> | |
</div> | |
<div> | |
<h4>h4</h4><br /> | |
<h2>h2</h2><br /> | |
<h4>h4</h4><br /> | |
<h5>h5</h5><br /> | |
<h5>h5</h5><br /> | |
<h6>h6</h6><br /> | |
</div> | |
<div> | |
<h4>h4</h4><br /> | |
<h2>h2</h2><br /> | |
<h1>h1</h1><br /> | |
<h4>h4</h4><br /> | |
<h6>h6</h6><br /> | |
<h4>h4</h4><br /> | |
</div> | |
<div> | |
<h1>h1</h1><br /> | |
<h4>h4</h4><br /> | |
<h6>h6</h6><br /> | |
<h5>h5</h5><br /> | |
<h6>h6</h6><br /> | |
<h4>h4</h4><br /> | |
</div> | |
<div> | |
<h6>h6</h6><br /> | |
<h4>h4</h4><br /> | |
<h2>h2</h2><br /> | |
<h5>h5</h5><br /> | |
<h6>h6</h6><br /> | |
<h2>h2</h2><br /> | |
</div> | |
<div> | |
<h5>h5</h5><br /> | |
<h4>h4</h4><br /> | |
<h3>h3</h3><br /> | |
<h6>h6</h6><br /> | |
<h1>h1</h1><br /> | |
<h3>h3</h3><br /> | |
</div> | |
<div> | |
<h3>h3</h3><br /> | |
<h1>h1</h1><br /> | |
<h4>h4</h4><br /> | |
<h4>h4</h4><br /> | |
<h4>h4</h4><br /> | |
<h4>h4</h4><br /> | |
</div> | |
<div> | |
<h5>h5</h5><br /> | |
<h5>h5</h5><br /> | |
<h2>h2</h2><br /> | |
<h2>h2</h2><br /> | |
<h6>h6</h6><br /> | |
<h1>h1</h1><br /> | |
</div> | |
<div> | |
<h4>h4</h4><br /> | |
<h1>h1</h1><br /> | |
<h4>h4</h4><br /> | |
<h2>h2</h2><br /> | |
<h2>h2</h2><br /> | |
<h6>h6</h6><br /> | |
</div> | |
<div> | |
<h2>h2</h2><br /> | |
<h5>h5</h5><br /> | |
<h3>h3</h3><br /> | |
<h2>h2</h2><br /> | |
<h6>h6</h6><br /> | |
<h3>h3</h3><br /> | |
</div> | |
<div> | |
<h3>h3</h3><br /> | |
<h2>h2</h2><br /> | |
<h6>h6</h6><br /> | |
<h2>h2</h2><br /> | |
<h6>h6</h6><br /> | |
<h6>h6</h6><br /> | |
</div> | |
<div> | |
<h3>h3</h3><br /> | |
<h2>h2</h2><br /> | |
<h2>h2</h2><br /> | |
<h4>h4</h4><br /> | |
<h2>h2</h2><br /> | |
<h6>h6</h6><br /> | |
</div> | |
<div> | |
<h5>h5</h5><br /> | |
<h6>h6</h6><br /> | |
<h6>h6</h6><br /> | |
<h1>h1</h1><br /> | |
<h4>h4</h4><br /> | |
<h1>h1</h1><br /> | |
</div> | |
<div> | |
<h6>h6</h6><br /> | |
<h3>h3</h3><br /> | |
<h6>h6</h6><br /> | |
<h3>h3</h3><br /> | |
<h6>h6</h6><br /> | |
<h1>h1</h1><br /> | |
</div> | |
<div> | |
<h2>h2</h2><br /> | |
<h2>h2</h2><br /> | |
<h6>h6</h6><br /> | |
<h5>h5</h5><br /> | |
<h1>h1</h1><br /> | |
<h4>h4</h4><br /> | |
</div> | |
<div> | |
<h5>h5</h5><br /> | |
<h3>h3</h3><br /> | |
<h6>h6</h6><br /> | |
<h1>h1</h1><br /> | |
<h2>h2</h2><br /> | |
<h5>h5</h5><br /> | |
</div> | |
<div> | |
<h3>h3</h3><br /> | |
<h6>h6</h6><br /> | |
<h5>h5</h5><br /> | |
<h6>h6</h6><br /> | |
<h5>h5</h5><br /> | |
<h4>h4</h4><br /> | |
</div> | |
<div> | |
<h3>h3</h3><br /> | |
<h4>h4</h4><br /> | |
<h2>h2</h2><br /> | |
<h5>h5</h5><br /> | |
<h1>h1</h1><br /> | |
<h3>h3</h3><br /> | |
</div> | |
<div> | |
<h5>h5</h5><br /> | |
<h3>h3</h3><br /> | |
<h1>h1</h1><br /> | |
<h5>h5</h5><br /> | |
<h5>h5</h5><br /> | |
<h2>h2</h2><br /> | |
</div> | |
<div> | |
<h4>h4</h4><br /> | |
<h5>h5</h5><br /> | |
<h3>h3</h3><br /> | |
<h1>h1</h1><br /> | |
<h5>h5</h5><br /> | |
<h3>h3</h3><br /> | |
</div> | |
<div> | |
<h1>h1</h1><br /> | |
<h2>h2</h2><br /> | |
<h3>h3</h3><br /> | |
<h4>h4</h4><br /> | |
<h5>h5</h5><br /> | |
<h6>h6</h6><br /> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment