Created
February 6, 2012 17:34
-
-
Save dennisfrank/1753540 to your computer and use it in GitHub Desktop.
Flexible inline text with background color and large right padding
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
/** | |
* Flexible inline text with background color and large right padding | |
*/ | |
body { | |
width: 50%; | |
background: #363532; | |
} | |
p { | |
display: inline; | |
} | |
p, p>span { | |
position: relative; | |
right: 4em; /* 4em right margin */ | |
line-height: 2em; | |
padding: .3em 0; /* line padding */ | |
background: #fff; | |
} | |
span>span { | |
position: relative; | |
left: .5em; /* left margin */ | |
} | |
p { | |
left: 4em; | |
} |
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
<p> | |
<span><span>Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis | |
vestibulum. Morbi leo risus, porta ac consectetur ac, vestibulum | |
at eros. Donec id elit non mi porta gravida at eget metus.</span></span> | |
</p> |
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":"split","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment