Skip to content

Instantly share code, notes, and snippets.

@gunnarbittersmann
Created December 12, 2012 21:39
Show Gist options
  • Select an option

  • Save gunnarbittersmann/4271864 to your computer and use it in GitHub Desktop.

Select an option

Save gunnarbittersmann/4271864 to your computer and use it in GitHub Desktop.
Centered body with different backgrounds on both sides.
/**
* Centered body with different backgrounds on both sides.
*/
* { box-sizing: border-box }
html
{
height: 100%;
background-image: url(http://www.dvd-ppt-slideshow.com/images/ppt-background/background-13.jpg),
url(http://www.dvd-ppt-slideshow.com/images/ppt-background/background-19.jpg);
background-repeat: repeat-y;
background-size: 50% auto;
background-position: left, right;
}
body
{
max-width: 30em;
min-height: 100%;
margin: auto;
padding: 2em;
background-color: hsla(0, 0%, 100%, 0.9);
}
<p>Centered body with different backgrounds on both sides.</p>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"1","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment