Created
June 13, 2014 09:23
-
-
Save joews/ed7130af97d7cac571fe to your computer and use it in GitHub Desktop.
Untitled
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
** | |
* The first commented line is your dabblet’s title | |
*/ | |
.wrapper { | |
position: relative; | |
} | |
.line { | |
position: absolute; | |
height: 1px; | |
width: 100%; | |
background-color: white; | |
} | |
.line.top { | |
top: 53px; | |
} | |
.line.bottom { | |
top: 65px; | |
} | |
p.a { | |
background-color: steelblue; | |
} | |
p.b { | |
background-color: lightgray; | |
} | |
p { | |
margin: 0; | |
height: 100px; | |
font-size: 20px; | |
font-family: 'Lucida Grande'; | |
color: white; | |
} | |
span { | |
/* can be any value to change text height inside p without pushing down the next element */ | |
line-height: 100px; | |
} |
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
<div class="wrapper"> | |
<p class="a"><span>Here is some text</span></p> | |
<div class="line top"></div> | |
<div class="line bottom"></div> | |
<p class="b">I am not pushed down when above span's line-height changes.</p> | |
</div> |
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
// alert('Hello world!'); |
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
{"view":"separate","fontsize":"80","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment