Skip to content

Instantly share code, notes, and snippets.

@sitefinitydcx
Created March 13, 2012 18:52
Show Gist options
  • Save sitefinitydcx/2030722 to your computer and use it in GitHub Desktop.
Save sitefinitydcx/2030722 to your computer and use it in GitHub Desktop.
Adaptiv Template for Sitefinity responsive web design
/* - based on boilerplate reset ------------------------------------------ */
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }audio:not([controls]) { display: none; }[hidden] { display: none; }a:hover, a:active { outline: 0; }abbr[title] { border-bottom: 1px dotted; }b, strong { font-weight: bold; }blockquote { margin: 1em 40px; }dfn { font-style: italic; }hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }ins { background: #ff9; color: #000; text-decoration: none; }mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }q { quotes: none; }q:before, q:after { content: ""; content: none; }small { font-size: 85%; }sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }sup { top: -0.5em; }sub { bottom: -0.25em; }ul, ol { margin: 1em 0; padding: 0 0 0 40px; } dd { margin: 0 0 0 40px; } nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }figure { margin: 0; }form { margin: 0; }fieldset { border: 0; margin: 0; padding: 0; }label { cursor: pointer; }textarea { overflow: auto; vertical-align: top; resize: vertical; }table { border-collapse: collapse; border-spacing: 0; } td { vertical-align: top; }svg:not(:root) { overflow: hidden; } input[type="checkbox"], input[type="radio"] { box-sizing: border-box; }::selection { background: #fe57a1; color: #fff; text-shadow: none; }img { border: 0; vertical-align: middle; }pre { white-space: pre; white-space: pre-wrap; }pre, code, kbd, samp { font-family: monospace, monospace; font-size: 1em; }audio, canvas, video { display: inline-block;}legend { border: 0; padding: 0;}button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; }button, input { line-height: normal; }.sf_cols{width:100%;margin:0;padding:0;clear:both;display:inline-block}.sf_cols:after{content:"";display:block;height:0;font-size:1px;clear:both;visibility:hidden}
* legend {margin-left: -7px;} * button, input, select, textarea {vertical-align: middle;} * button, input {overflow: visible; } * table button, table input {overflow: auto;}
.sf_4cols_2_25 .sf_4cols_2in_25, .sf_4cols_3_25 .sf_4cols_3in_25, .sf_4cols_4_25 .sf_4cols_4in_25, .sf_3cols_2_34 .sf_3cols_2in_34, .sf_3cols_3_33 .sf_3cols_3in_33 {margin:0px;}
/* - hacks - break w3c validation ---------------------------------------- */
* audio, canvas, video {display: inline; zoom: 1;}
button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; }input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; }html {font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }img { -ms-interpolation-mode: bicubic;}
/* - base and color settings --------------------------------------------- */
html {font-size: 100%;overflow-y: scroll;}body {margin:0 auto;padding:0;width:100%;font-size:1em;line-height:1.5em;}
body, button, input, select, textarea {font-family: sans-serif; color: #222;}
input:valid, textarea:valid { }input:invalid, textarea:invalid {background-color: #f0dddd;}
a {color: #00e; }a:visited {color: #551a8b; }a:hover {color: #06e; }a:focus {outline: thin dotted; }
/* - project css --------------------------------------------------------- */
#sfWrapper{overflow:hidden;margin:0 auto;background-color:#ffffff;color:#2e2e2e;width:98%;}
#HeaderWrapper{background-color: #2e2e2e;color:#ffffff;margin:0;height:auto;display:block;float:left;width:97.5%; min-height:1em;padding:1.25%;overflow:hidden;}
#cpw_header{height:inherit;width:24%;display:block;float:left;margin:0;}
#cpw_nav{height:inherit;width:74%;display:block;float:right;}
#BannerWrapper{margin:0;width:100%;height:auto;display:block;float:left;}
.mp_cols1 #cpw_banner{min-height:50px;height:auto;width:100%;float:left;overflow:hidden;}
.mp_cols1 #cpw_banner img{width:100%; height:auto;}
.mp_cols2_l #cpw_banner, .mp_cols2_r #cpw_banner{min-height:50px;height:auto;width:100%;float:left;overflow:hidden;}
.mp_cols2_l #cpw_banner div.sfContentBlock{padding:1em;text-align:justify;}
.mp_cols2_r #cpw_banner div.sfContentBlock{padding:1em;text-align:justify;}
#ContentWrapper{margin:0;width:100%;height:auto;display:block;float:left;}
.mp_cols2_r #cpw_content{background-color: #ffffff; color:#2e2e2e; display:inline-block; width:72.5%; padding:1.25%;}
.mp_cols2_r #cpw_aside{width:24%;display:inline-block;float:right;}
#cpw_asideheader{background-color: #454545; color:#ffffff; overflow:hidden; min-height:34px; width:100%;}
#cpw_asideheader div.sfContentBlock{padding:1em;}
#cpw_asideimage{background-color: #454545;color:#ffffff;overflow:hidden; width:100%;}
#cpw_asideimage img {width: auto !important; max-width: 100%; height: auto !important; overflow:hidden;}
#cpw_asidetext{background-color: #e2e2e2; color:#000; display:inline-block; height:auto; width:100%;}
#cpw_asidetext div.sfContentBlock{padding:1em;}
.mp_cols2_l #cpw_content{background-color: #ffffff; color:#2e2e2e; display:inline-block; width:72.5%; padding:1.25%;float:right;}
.mp_cols2_l #cpw_aside{width:24%;display:inline-block;float:left;}
.mp_cols1 #cpw_content div.sfContentBlock{padding:1em;text-align:justify;}
#cpw_content div.sfContentBlock h3:after{content:url("/Sitefinity/WebsiteTemplates/MyTemplate/App_Themes/MyTheme/Images/frame_bg.gif");}
#FooterWrapper{margin:0;width:100%;height:auto;display:block;float:left;}
#cpw_footer{background-color: #f2f2f2; color:#2e2e2e; min-height:3.5em; max-height:30em; float:left; width:97.5%; padding:1.25%;}
.sf_3cols_1_33, .sf_3cols_2_34, .sf_3cols_3_33{width:25%;}.sf_3cols_2_34{margin: 0 12.5%}
#cpw_footer div.sfContentBlock{padding:1em;text-align:justify;}
#cpw_copyright{background-color: #2e2e2e; color:#ffffff; min-height:3.5em; height:auto; float:left; width:97.5%; padding:0.3125% 1.25% ;}
/* - navigation css ------------------------------------------------------ */
ul.head_navigation {text-align:right;width:100%;margin-top:1.5em;}ul.head_navigation li {text-align:right;text-transform:uppercase;display:inline;width:auto;margin-left:1.25%}
ul.head_navigation a {color: #ffffff;text-decoration:none;}ul.head_navigation a:hover {color: #e2e2e2; text-decoration:underline;}
/* - banner css ------------------------------------------------------ */
#cpw_banner .crop_left img{float:left !important;width:inherit !important; height:auto !important;}
#cpw_banner .crop_right img{float:right !important;width:inherit !important; height:auto !important;}
#cpw_banner .scale img{width:100% !important; height:auto !important;}
/* - footer news css ------------------------------------------------------ */
.footer_news ul {margin:1em;padding:1em;}
.footer_news li {list-style-type:square;}
/* - navigation css ------------------------------------------------------ */
/* - closing css and media queries --------------------------------------- */
.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; } .ir br { display: none; } .hidden { display: none !important; visibility: hidden; } .visuallyhidden { border: 0; clip: rect(0, 0, 0, 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } .invisible { visibility: hidden; } .clearfix:before, .clearfix:after { content: ""; display: table; } .clearfix:after { clear: both; } .clearfix { }
@media screen and (max-width:320px){
#sfWrapper{max-width:280px;font-size:0.75em;line-height:1.5em}
#cpw_header{visibility:hidden;}
#cpw_nav{width:100%;float:left;}
#cpw_banner{display:none;visibility:hidden;}
#cpw_content{width:100%;}#cpw_aside{width:100%;}
.sf_2cols_1_50{width:100%;display:inline-block;} .sf_2cols_2_50{width:100%;display:inline-block;}
.sf_4cols_1_25, .sf_4cols_2_25, .sf_4cols_3_25, .sf_4cols_4_25{width:100%;display:inline-block;}
}
@media screen and (min-width:321px) and (max-width:480px){
#sfWrapper{max-width:460px;font-size:0.75em;line-height:1.5em}
#cpw_header{visibility:hidden;}
#cpw_nav{width:100%;float:left;}
#cpw_content{width:100%;}
#cpw_aside{width:100%;}
.sf_2cols_1_50{width:100%;display:inline-block;} .sf_2cols_2_50{width:100%;display:inline-block;}
.sf_4cols_1_25, .sf_4cols_2_25, .sf_4cols_3_25, .sf_4cols_4_25{width:50%;display:inline-block;}
.sf_4cols_3_25{clear:both;}
}
@media screen and (min-width:481px) and (max-width:768px){
#sfWrapper{max-width:700px;font-size:0.75em;line-height:1.5em}
.sf_2cols_1_50{width:100%;display:inline-block;} .sf_2cols_2_50{width:100%;display:inline-block;}
.sf_4cols_1_25, .sf_4cols_2_25, .sf_4cols_3_25, .sf_4cols_4_25{width:50%;display:inline-block;}
.sf_4cols_3_25{clear:both;}
}
@media screen and (min-width:769px) and (max-width:1280px){
#sfWrapper{max-width:960px;font-size:0.75em;line-height:1.5em}
}
@media screen and (min-width:1281px) and (max-width:1400px){
#sfWrapper{max-width:1120px;font-size:0.75em;line-height:1.5em;}
}
@media screen and (min-width:1401px) and (max-width:1600px){
#sfWrapper{max-width:1260px;font-size:0.875em;line-height:1.5em;}
}
@media screen and (min-width:1601px){
#sfWrapper{max-width:1540px;width:90%;font-size:0.875em;line-height:1.5em;}
.sfPageEditor #sfWrapper{max-width:90% !important;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment