├── images ├── header.jpg ├── sidebar-01.jpg ├── sidebar-02.jpg ├── two-column-01.jpg ├── two-column-02.jpg ├── three-column-01.jpg ├── three-column-02.jpg └── three-column-03.jpg ├── README.md ├── styles.css └── index.html /images/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emailwizardry/creating-a-future-proof-responsive-email-without-media-queries/HEAD/images/header.jpg -------------------------------------------------------------------------------- /images/sidebar-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emailwizardry/creating-a-future-proof-responsive-email-without-media-queries/HEAD/images/sidebar-01.jpg -------------------------------------------------------------------------------- /images/sidebar-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emailwizardry/creating-a-future-proof-responsive-email-without-media-queries/HEAD/images/sidebar-02.jpg -------------------------------------------------------------------------------- /images/two-column-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emailwizardry/creating-a-future-proof-responsive-email-without-media-queries/HEAD/images/two-column-01.jpg -------------------------------------------------------------------------------- /images/two-column-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emailwizardry/creating-a-future-proof-responsive-email-without-media-queries/HEAD/images/two-column-02.jpg -------------------------------------------------------------------------------- /images/three-column-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emailwizardry/creating-a-future-proof-responsive-email-without-media-queries/HEAD/images/three-column-01.jpg -------------------------------------------------------------------------------- /images/three-column-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emailwizardry/creating-a-future-proof-responsive-email-without-media-queries/HEAD/images/three-column-02.jpg -------------------------------------------------------------------------------- /images/three-column-03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emailwizardry/creating-a-future-proof-responsive-email-without-media-queries/HEAD/images/three-column-03.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Tuts+ Tutorial: Creating a Future-Proof Responsive Email Without Media Queries 2 | #### Instructor: Nicole Merlin 3 | 4 | Using this ‘fluid hybrid’ method you can build an HTML email with lots of different layouts that doesn't rely on media queries to look great on mobile devices. 5 | 6 | Source files for the Tuts+ tutorial: [Creating a Future-Proof Responsive Email Without Media Queries](http://webdesign.tutsplus.com/tutorials/creating-a-future-proof-responsive-email-without-media-queries--cms-23919) 7 | 8 | **Available on Tuts+ June, 2015** 9 | 10 | [View the demo](http://tutsplus.github.io/creating-a-future-proof-responsive-email-without-media-queries/index.html) 11 | -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | /* Basics */ 2 | body { 3 | Margin: 0; 4 | padding: 0; 5 | min-width: 100%; 6 | background-color: #ffffff; 7 | } 8 | table { 9 | border-spacing: 0; 10 | font-family: sans-serif; 11 | color: #333333; 12 | } 13 | td { 14 | padding: 0; 15 | } 16 | img { 17 | border: 0; 18 | } 19 | .wrapper { 20 | width: 100%; 21 | table-layout: fixed; 22 | -webkit-text-size-adjust: 100%; 23 | -ms-text-size-adjust: 100%; 24 | } 25 | .webkit { 26 | max-width: 600px; 27 | } 28 | .outer { 29 | Margin: 0 auto; 30 | width: 100%; 31 | max-width: 600px; 32 | } 33 | .inner { 34 | padding: 10px; 35 | } 36 | .contents { 37 | width: 100%; 38 | } 39 | p { 40 | Margin: 0; 41 | } 42 | a { 43 | color: #ee6a56; 44 | text-decoration: underline; 45 | } 46 | .h1 { 47 | font-size: 21px; 48 | font-weight: bold; 49 | Margin-bottom: 18px; 50 | } 51 | .h2 { 52 | font-size: 18px; 53 | font-weight: bold; 54 | Margin-bottom: 12px; 55 | } 56 | .full-width-image img { 57 | width: 100%; 58 | height: auto; 59 | /*display: block;*/ 60 | } 61 | 62 | /* Windows Phone Viewport Fix */ 63 | @-ms-viewport { 64 | width: device-width; 65 | } 66 | 67 | /* One column layout */ 68 | .one-column .contents { 69 | text-align: left; 70 | } 71 | .one-column p { 72 | font-size: 14px; 73 | Margin-bottom: 10px; 74 | } 75 | 76 | /*Two column layout*/ 77 | .two-column { 78 | text-align: center; 79 | font-size: 0; 80 | } 81 | .two-column .column { 82 | width: 100%; 83 | max-width: 300px; 84 | display: inline-block; 85 | vertical-align: top; 86 | } 87 | .two-column .contents { 88 | font-size: 14px; 89 | text-align: left; 90 | } 91 | .two-column img { 92 | width: 100%; 93 | height: auto; 94 | } 95 | .two-column .text { 96 | padding-top: 10px; 97 | } 98 | 99 | /*Three column layout*/ 100 | .three-column { 101 | text-align: center; 102 | font-size: 0; 103 | padding-top: 10px; 104 | padding-bottom: 10px; 105 | } 106 | .three-column .column { 107 | width: 100%; 108 | max-width: 200px; 109 | display: inline-block; 110 | vertical-align: top; 111 | } 112 | .three-column img { 113 | width: 100%; 114 | height: auto; 115 | } 116 | .three-column .contents { 117 | font-size: 14px; 118 | text-align: center; 119 | } 120 | .three-column .text { 121 | padding-top: 10px; 122 | } 123 | 124 | 125 | /* Left sidebar layout */ 126 | .left-sidebar { 127 | text-align: center; 128 | font-size: 0; 129 | } 130 | .left-sidebar .column { 131 | width: 100%; 132 | display: inline-block; 133 | vertical-align: middle; 134 | } 135 | .left-sidebar .left { 136 | max-width: 100px; 137 | } 138 | .left-sidebar .right { 139 | max-width: 500px; 140 | } 141 | .left-sidebar .contents { 142 | font-size: 14px; 143 | text-align: center; 144 | } 145 | .left-sidebar a { 146 | color: #85ab70; 147 | } 148 | 149 | /* Right sidebar layout */ 150 | .right-sidebar { 151 | text-align: center; 152 | font-size: 0; 153 | } 154 | .right-sidebar .column { 155 | width: 100%; 156 | display: inline-block; 157 | vertical-align: middle; 158 | } 159 | .right-sidebar .left { 160 | max-width: 100px; 161 | } 162 | .right-sidebar .right { 163 | max-width: 500px; 164 | } 165 | .right-sidebar .contents { 166 | font-size: 14px; 167 | text-align: center; 168 | } 169 | .right-sidebar a { 170 | color: #70bbd9; 171 | } 172 | 173 | /*Media Queries*/ 174 | @media screen and (max-width: 400px) { 175 | .two-column .column, 176 | .three-column .column { 177 | max-width: 100% !important; 178 | } 179 | .three-column img { 180 | max-width: 50% !important; 181 | } 182 | } 183 | 184 | @media screen and (min-width: 401px) and (max-width: 620px) { 185 | .three-column .column { 186 | max-width: 33% !important; 187 | } 188 | .two-column .column { 189 | max-width: 50% !important; 190 | } 191 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |
26 |
27 | |
28 | |||||||||
31 |
|
40 | |||||||||
|
43 |
48 |
49 |
68 |
71 |
72 |
91 |
96 |
|
97 | |||||||||
100 |
105 |
|
171 | |||||||||
174 |
179 |
|
257 | |||||||||
260 |
265 |
|
288 | |||||||||
291 |
296 |
|
319 |