Skip to content

Instantly share code, notes, and snippets.

@mhulse
Created June 18, 2014 21:24
Show Gist options
  • Save mhulse/df91a931538186bae1d2 to your computer and use it in GitHub Desktop.
Save mhulse/df91a931538186bae1d2 to your computer and use it in GitHub Desktop.
Site skin CSS example.
/**
* Site Skin background ad.
*
* Example:
*
* <a id="skin" href="http://www.google.com"></a>
*/
/*----------------------------------( GLOBALS )----------------------------------*/
html,
body { height: 100%; }
/*----------------------------------( GRID )----------------------------------*/
.wiffle {
background-color: #fff;
border-width: 0 5px;
border-style: solid;
border-color: #fff;
height: auto;
min-height: 100%;
_height: 100%;
margin: 0 5px;
}
@media only screen and (min-width: 665px) {
.wiffle { margin: 0 auto; }
}
@media only screen and (min-width: 1005px) {
.wiffle {
margin: 0 0 0 -490px;
position: absolute;
z-index: 2;
left: 50%;
top: 0;
}
}
@media only screen and (min-width: 1345px) {
.wiffle { margin: 0 0 0 -660px; }
}
/*----------------------------------( AD )----------------------------------*/
a#site_skin_1 { display: none; }
@media only screen and (min-width: 1005px) {
a#site_skin_1 {
width: 100%;
_height: 100%;
min-height: 100%;
background-color: #314a11;
background-image: url(ad970.png);
background-repeat: no-repeat;
background-position: center top;
background-attachment: fixed;
display: block;
position: fixed;
z-index: 1;
_top: expression((ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + 'px'); /* <= IE6 */
}
}
@media only screen and (min-width: 1345px) {
a#site_skin_1 { background-image: url(ad1300.png); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment