endymion-origami 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.textile +138 -0
  3. data/Rakefile +39 -0
  4. data/app/helpers/layout_helper.rb +44 -0
  5. data/app/views/layouts/1_column_em.html.erb +110 -0
  6. data/app/views/layouts/1_column_percentage.html.erb +127 -0
  7. data/app/views/layouts/1_column_pixel.html.erb +110 -0
  8. data/app/views/layouts/2_column_left_menu_em.html.erb +209 -0
  9. data/app/views/layouts/2_column_left_menu_percentage.html.erb +181 -0
  10. data/app/views/layouts/2_column_left_menu_pixel.html.erb +216 -0
  11. data/app/views/layouts/2_column_right_menu_em.html.erb +204 -0
  12. data/app/views/layouts/2_column_right_menu_percentage.html.erb +227 -0
  13. data/app/views/layouts/2_column_right_menu_pixel.html.erb +240 -0
  14. data/app/views/layouts/3_column_blog_em.html.erb +257 -0
  15. data/app/views/layouts/3_column_blog_percentage.html.erb +255 -0
  16. data/app/views/layouts/3_column_blog_pixel.html.erb +268 -0
  17. data/app/views/layouts/3_column_holy_grail_em.html.erb +262 -0
  18. data/app/views/layouts/3_column_holy_grail_percentage.html.erb +255 -0
  19. data/app/views/layouts/3_column_holy_grail_pixel.html.erb +262 -0
  20. data/app/views/layouts/_body.html.erb +7 -0
  21. data/app/views/layouts/_column_1.html.erb +5 -0
  22. data/app/views/layouts/_column_2.html.erb +5 -0
  23. data/app/views/layouts/_column_3.html.erb +5 -0
  24. data/app/views/layouts/_flashes.html.erb +15 -0
  25. data/app/views/layouts/_footer.html.erb +5 -0
  26. data/app/views/layouts/_google_analytics_tracker.html.erb +8 -0
  27. data/app/views/layouts/_head.html.erb +23 -0
  28. data/app/views/layouts/_header.html.erb +5 -0
  29. data/app/views/layouts/_image_replacement.html.erb +3 -0
  30. data/app/views/layouts/_javascript_includes.html.erb +1 -0
  31. data/app/views/layouts/_layout_and_theme_stylesheets.html.erb +8 -0
  32. data/app/views/layouts/stacked_columns.html.erb +418 -0
  33. data/assets/bluetrip-css-framework/LICENSE +312 -0
  34. data/assets/bluetrip-css-framework/README.rst +37 -0
  35. data/assets/bluetrip-css-framework/css/ie.css +21 -0
  36. data/assets/bluetrip-css-framework/css/print.css +49 -0
  37. data/assets/bluetrip-css-framework/css/screen.css +409 -0
  38. data/assets/bluetrip-css-framework/css/style.css +7 -0
  39. data/assets/bluetrip-css-framework/examples/grid.html +232 -0
  40. data/assets/bluetrip-css-framework/examples/index.html +263 -0
  41. data/assets/bluetrip-css-framework/examples/test-small.jpg +0 -0
  42. data/assets/bluetrip-css-framework/img/grid.png +0 -0
  43. data/assets/bluetrip-css-framework/img/icons/cross.png +0 -0
  44. data/assets/bluetrip-css-framework/img/icons/doc.png +0 -0
  45. data/assets/bluetrip-css-framework/img/icons/email.png +0 -0
  46. data/assets/bluetrip-css-framework/img/icons/external.png +0 -0
  47. data/assets/bluetrip-css-framework/img/icons/feed.png +0 -0
  48. data/assets/bluetrip-css-framework/img/icons/im.png +0 -0
  49. data/assets/bluetrip-css-framework/img/icons/information.png +0 -0
  50. data/assets/bluetrip-css-framework/img/icons/key.png +0 -0
  51. data/assets/bluetrip-css-framework/img/icons/pdf.png +0 -0
  52. data/assets/bluetrip-css-framework/img/icons/tick.png +0 -0
  53. data/assets/bluetrip-css-framework/img/icons/visited.png +0 -0
  54. data/assets/bluetrip-css-framework/img/icons/xls.png +0 -0
  55. data/init.rb +1 -0
  56. data/install.rb +1 -0
  57. data/lib/chaise.rb +9 -0
  58. data/origami.gemspec +118 -0
  59. data/public/stylesheets/1_column_em.css +117 -0
  60. data/public/stylesheets/1_column_percentage.css +134 -0
  61. data/public/stylesheets/1_column_pixel.css +117 -0
  62. data/public/stylesheets/2_column_left_menu_em.css +149 -0
  63. data/public/stylesheets/2_column_left_menu_percentage.css +142 -0
  64. data/public/stylesheets/2_column_left_menu_pixel.css +149 -0
  65. data/public/stylesheets/2_column_right_menu_em.css +148 -0
  66. data/public/stylesheets/2_column_right_menu_percentage.css +142 -0
  67. data/public/stylesheets/2_column_right_menu_pixel.css +148 -0
  68. data/public/stylesheets/3_column_blog_pixel.css +162 -0
  69. data/rails/init.rb +1 -0
  70. data/rdoc/classes/ApplicationController.html +151 -0
  71. data/rdoc/created.rid +1 -0
  72. data/rdoc/files/README_textile.html +363 -0
  73. data/rdoc/files/lib/chaise_rb.html +101 -0
  74. data/rdoc/fr_class_index.html +27 -0
  75. data/rdoc/fr_file_index.html +28 -0
  76. data/rdoc/fr_method_index.html +27 -0
  77. data/rdoc/index.html +24 -0
  78. data/rdoc/rdoc-style.css +208 -0
  79. data/tasks/chaise_tasks.rake +15 -0
  80. data/test/chaise_test.rb +26 -0
  81. data/test/test_helper.rb +3 -0
  82. data/uninstall.rb +1 -0
  83. metadata +136 -0
@@ -0,0 +1,262 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml">
4
+ <head>
5
+ <title>The Holy Grail 3 column Liquid Layout. Em widths. Cross-Browser. Equal Height Columns.</title>
6
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
7
+ <meta name="description" content="The Holy Grail 3 column Liquid Layout. Em widths. Cross-Browser. Equal Height Columns." />
8
+ <meta name="keywords" content="The Holy Grail 3 column Liquid Layout. Em widths. Cross-Browser. Equal Height Columns." />
9
+ <meta name="robots" content="index, follow" />
10
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
11
+ <style media="screen" type="text/css">
12
+ /* <!-- */
13
+ /* General styles */
14
+ body {
15
+ margin:0;
16
+ padding:0;
17
+ border:0; /* This removes the border around the viewport in old versions of IE */
18
+ width:100%;
19
+ background:#fff;
20
+ min-width:600px; /* Minimum width of layout - remove line if not required */
21
+ /* The min-width property does not work in old versions of Internet Explorer */
22
+ }
23
+ /* Header styles */
24
+ #header {
25
+ clear:both;
26
+ float:left;
27
+ width:100%;
28
+ }
29
+ #header {
30
+ border-bottom:1px solid #000;
31
+ }
32
+ #header p,
33
+ #header h1,
34
+ #header h2 {
35
+ padding:.4em 15px 0 15px;
36
+ margin:0;
37
+ }
38
+ #header ul {
39
+ clear:left;
40
+ float:left;
41
+ width:100%;
42
+ list-style:none;
43
+ margin:10px 0 0 0;
44
+ padding:0;
45
+ }
46
+ #header ul li {
47
+ display:inline;
48
+ list-style:none;
49
+ margin:0;
50
+ padding:0;
51
+ }
52
+ #header ul li a {
53
+ display:block;
54
+ float:left;
55
+ margin:0 0 0 1px;
56
+ padding:3px 10px;
57
+ text-align:center;
58
+ background:#eee;
59
+ color:#000;
60
+ text-decoration:none;
61
+ position:relative;
62
+ left:15px;
63
+ line-height:1.3em;
64
+ }
65
+ #header ul li a:hover {
66
+ background:#369;
67
+ color:#fff;
68
+ }
69
+ #header ul li a.active,
70
+ #header ul li a.active:hover {
71
+ color:#fff;
72
+ background:#000;
73
+ font-weight:bold;
74
+ }
75
+ #header ul li a span {
76
+ display:block;
77
+ }
78
+ /* 'widths' sub menu */
79
+ #layoutdims {
80
+ clear:both;
81
+ background:#eee;
82
+ border-top:4px solid #000;
83
+ margin:0;
84
+ padding:6px 15px !important;
85
+ text-align:right;
86
+ }
87
+ /* column container */
88
+ .colmask {
89
+ position:relative; /* This fixes the IE7 overflow hidden bug and stops the layout jumping out of place */
90
+ clear:both;
91
+ float:left;
92
+ width:100%; /* width of whole page */
93
+ overflow:hidden; /* This chops off any overhanging divs */
94
+ }
95
+ /* holy grail 3 column settings */
96
+ .holygrail {
97
+ background:#CDEAFF; /* Right column background colour */
98
+ }
99
+ .holygrail .colmid {
100
+ float:left;
101
+ width:200%;
102
+ margin-left:-12em; /* Width of right column */
103
+ position:relative;
104
+ right:100%;
105
+ background:#fff; /* Centre column background colour */
106
+ }
107
+ .holygrail .colleft {
108
+ float:left;
109
+ width:100%;
110
+ margin-left:-50%;
111
+ position:relative;
112
+ left:24em; /* Left column width + right column width */
113
+ background:#cfc; /* Left column background colour */
114
+ }
115
+ .holygrail .col1wrap {
116
+ float:left;
117
+ width:50%;
118
+ position:relative;
119
+ right:12em; /* Width of left column */
120
+ padding-bottom:1em; /* Centre column bottom padding. Leave it out if it's zero */
121
+ }
122
+ .holygrail .col1 {
123
+ margin:0 13em; /* Centre column side padding:
124
+ Left padding = left column width + centre column left padding width
125
+ Right padding = right column width + centre column right padding width */
126
+ position:relative;
127
+ left:200%;
128
+ overflow:hidden;
129
+ }
130
+ .holygrail .col2 {
131
+ float:left;
132
+ float:right; /* This overrides the float:left above */
133
+ width:10em; /* Width of left column content (left column width minus left and right padding) */
134
+ position:relative;
135
+ right:1em; /* Width of the left-had side padding on the left column */
136
+ }
137
+ .holygrail .col3 {
138
+ float:left;
139
+ float:right; /* This overrides the float:left above */
140
+ width:10em; /* Width of right column content (right column width minus left and right padding) */
141
+ margin-right:3em; /* Width of right column right-hand padding + left column left and right padding */
142
+ position:relative;
143
+ left:50%;
144
+ }
145
+ /* Footer styles */
146
+ #footer {
147
+ clear:both;
148
+ float:left;
149
+ width:100%;
150
+ border-top:1px solid #000;
151
+ }
152
+ #footer p {
153
+ padding:10px;
154
+ margin:0;
155
+ }
156
+ /* --> */
157
+ </style>
158
+ <!--[if lt IE 7]>
159
+ <style media="screen" type="text/css">
160
+ .col1 {
161
+ width:100%;
162
+ }
163
+ </style>
164
+ <![endif]-->
165
+ </head>
166
+ <body>
167
+
168
+ <div id="header">
169
+ <p><a href="http://matthewjamestaylor.com/blog/ultimate-multi-column-liquid-layouts-em-and-pixel-widths" title="Ultimate multi-column liquid layouts (em and pixel widths)">&laquo; Back to the CSS article</a> by <a href="http://matthewjamestaylor.com">Matthew James Taylor</a></p>
170
+ <h1>The 'Holy Grail' 3 column Liquid Layout (Em-widths)</h1>
171
+ <h2>No CSS hacks. SEO friendly 2-1-3 column order. Cross-browser. Equal height columns.</h2>
172
+ <ul>
173
+ <li><a href="http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-ems.htm" class="active">3 Column <span>Holy Grail</span></a></li>
174
+ <li><a href="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-ems.htm">3 Column <span>Blog Style</span></a></li>
175
+ <li><a href="http://matthewjamestaylor.com/blog/ultimate-2-column-left-menu-ems.htm">2 Column <span>Left Menu</span></a></li>
176
+ <li><a href="http://matthewjamestaylor.com/blog/ultimate-2-column-right-menu-ems.htm">2 Column <span>Right Menu</span></a></li>
177
+ <li><a href="http://matthewjamestaylor.com/blog/ultimate-1-column-full-page-ems.htm">1 Column <span>Full Page</span></a></li>
178
+ <li><a href="http://matthewjamestaylor.com/blog/ultimate-stacked-columns-ems.htm">Stacked <span>Columns</span></a></li>
179
+ </ul>
180
+ <p id="layoutdims">Measure columns in: <a href="http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-pixels.htm">Pixel widths</a> | <strong>Em widths</strong> | <a href="http://matthewjamestaylor.com/blog/perfect-3-column.htm">Percentage widths</a></p>
181
+ </div>
182
+ <div class="colmask holygrail">
183
+ <div class="colmid">
184
+ <div class="colleft">
185
+ <div class="col1wrap">
186
+ <div class="col1">
187
+ <!-- Column 1 start -->
188
+ <h2>Em dimensions of the holy grail layout</h2>
189
+ <img src="http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-ems-dimensions.gif" width="350" height="370" alt="The holy grail 3 column layout dimensions" />
190
+ <p>In this layout the side column widths are in ems and the centre page adjusts in size to fill the rest of the screen. Vertical dimensions are left unset so they automatically stretch to the height of the content. Layouts that use em widths are great when you want text to always line-break at the same point regardless of the text size. When you resize the text in your browser the width of the columns changes at the same rate.</p>
191
+ <h2>The nested div structure</h2>
192
+ <p>I've colour coded each div so it's easy to see:</p>
193
+ <img src="http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-div-structure.gif" width="350" height="369" alt="The holy grail 3 column layout nested div structure" />
194
+ <p>The header, colmask and footer divs are 100% wide and stacked vertically one after the other. Colmid is inside colmask and colleft is inside colmid. The left and right content columns are inside colleft. The center column needs to be inside the col1wrap div so it can be positioned correctly (This extra div is not required on the <a href="perfect-3-column.htm">percentage width version</a>). Notice that the main content column (col1) comes before the other columns.</p>
195
+ <!-- Column 1 end -->
196
+ </div>
197
+ </div>
198
+ <div class="col2">
199
+ <!-- Column 2 start -->
200
+ <h2>No CSS hacks</h2>
201
+ <p>The CSS used for this layout is 100% valid and hack free. To overcome Internet Explorer's broken box model, no horizontal padding or margins are used. Instead, this design uses pixel widths and clever relative positioning.</p>
202
+ <h2>SEO friendly 2-1-3 column ordering</h2>
203
+ <p>The higher up content is in your page code, the more important it is considered by search engine algorithms. To make your website as optimised as possible your main page content must come before the side columns. This layout does exactly that: The center page comes first, then the left column and finally the right column (see the nested div structure diagram for more info). The columns can also be configured to any other order if required.</p>
204
+ <h2>Equal height columns</h2>
205
+ <p>It doesn't matter which column has the longest content, the background colour of all columns will stretch down to meet the footer. This feature was traditionally only available with table based layouts but now with a little CSS trickery we can do exactly the same with divs. Say goodbye to annoying short columns!</p>
206
+ <h2>No Images</h2>
207
+ <p>This layout requires no images. Many CSS website designs need images to colour in the column backgrounds but that is not necessary with this design. Why waste bandwidth and precious HTTP requests when you can do everything in pure CSS and XHTML?</p>
208
+ <h2>No JavaScript</h2>
209
+ <p>JavaScript is not required. Some website layouts rely on JavaScript hacks to resize divs and force elements into place but you won't see any of that nonsense here.</p>
210
+ <!-- Column 2 end -->
211
+ </div>
212
+ <div class="col3">
213
+ <!-- Column 3 start -->
214
+ <h2>Full cross-browser support</h2>
215
+ <p>The holy grail 3 column liquid Layout has been tested on the following browsers:</p>
216
+
217
+ <h3>iPhone &amp; iPod Touch</h3>
218
+ <ul>
219
+ <li>Safari</li>
220
+ </ul>
221
+ <h3>Mac</h3>
222
+ <ul>
223
+ <li>Safari</li>
224
+ <li>Firefox</li>
225
+ <li>Opera 9.25</li>
226
+ <li>Netscape 9.0.0.5 &amp; 7.1</li>
227
+ </ul>
228
+ <h3>Windows</h3>
229
+ <ul>
230
+ <li>Firefox 1.5 &amp; 2</li>
231
+
232
+ <li>Safari</li>
233
+ <li>Opera 8.1 &amp; 9</li>
234
+ <li>Explorer 5.5, 6 &amp; 7</li>
235
+ <li>Netscape 8</li>
236
+ </ul>
237
+ <h2>Valid XHTML strict markup</h2>
238
+ <p>The HTML in this layout validates as XHTML 1.0 strict.</p>
239
+ <h2>Resizable text compatible</h2>
240
+ <p>This layout is fully compatible with resizable text. Resizable text is important for web accessibility. People who are vision impaired can make the text larger so it's easier for them to read. It is becoming increasingly more important to make your website resizable text compatible because people are expecting higher levels of web accessibility. Apple have made resizing the text on a website simple with the pinch gesture on their multi-touch trackpad. So far this trackpad is only available on the MacBook Air but it will soon be rolled out to all of their systems. Is your website text-resizing compatible?</p>
241
+ <h2>FREE for anyone to use</h2>
242
+ <p>You don't have to pay anything. Simply view the source of this page and save the HTML onto your computer. My only suggestion is to put the CSS into a separate file. If you are feeling generous however, link back to this page so other people can find and use this layout too.</p>
243
+ <h2>Free traffic for your website</h2>
244
+ <p>If you use this layout for your website <a href="http://matthewjamestaylor.com/about">send me an email</a> with the link and any other information you have so I can add you to my list of example sites. Once I have a few links I'll publish them on my website and you'll get free traffic!</p>
245
+ <!-- Column 3 end -->
246
+ </div>
247
+ </div>
248
+ </div>
249
+ </div>
250
+ <div id="footer">
251
+ <p>This page uses the <a href="http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-ems.htm">Ultimate 'Holy Grail' 3 column Liquid Layout</a> by <a href="http://matthewjamestaylor.com">Matthew James Taylor</a>. View more <a href="http://matthewjamestaylor.com/blog/-website-layouts">website layouts</a> and <a href="http://matthewjamestaylor.com/blog/-web-design">web design articles</a>.</p>
252
+ </div>
253
+
254
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
255
+ </script>
256
+ <script type="text/javascript">
257
+ _uacct = "UA-1848067-8";
258
+ urchinTracker();
259
+ </script>
260
+
261
+ </body>
262
+ </html>
@@ -0,0 +1,255 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
3
+ <head>
4
+ <title>The Perfect 3 Column Liquid Layout: No CSS hacks. SEO friendly. iPhone compatible.</title>
5
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
6
+ <meta name="description" content="The Perfect 3 Column Liquid Layout: No CSS hacks. SEO friendly. iPhone compatible." />
7
+ <meta name="keywords" content="The Perfect 3 Column Liquid Layout: No CSS hacks. SEO friendly. iPhone compatible." />
8
+ <meta name="robots" content="index, follow" />
9
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
10
+ <style media="screen" type="text/css">
11
+ /* <!-- */
12
+ /* General styles */
13
+ body {
14
+ margin:0;
15
+ padding:0;
16
+ border:0; /* This removes the border around the viewport in old versions of IE */
17
+ width:100%;
18
+ min-width:600px; /* Minimum width of layout - remove line if not required */
19
+ /* The min-width property does not work in old versions of Internet Explorer */
20
+ }
21
+ /* Header styles */
22
+ #header {
23
+ clear:both;
24
+ float:left;
25
+ width:100%;
26
+ }
27
+ #header {
28
+ border-bottom:1px solid #000;
29
+ }
30
+ #header p,
31
+ #header h1,
32
+ #header h2 {
33
+ padding:.4em 15px 0 15px;
34
+ margin:0;
35
+ }
36
+ #header ul {
37
+ clear:left;
38
+ float:left;
39
+ width:100%;
40
+ list-style:none;
41
+ margin:10px 0 0 0;
42
+ padding:0;
43
+ }
44
+ #header ul li {
45
+ display:inline;
46
+ list-style:none;
47
+ margin:0;
48
+ padding:0;
49
+ }
50
+ #header ul li a {
51
+ display:block;
52
+ float:left;
53
+ margin:0 0 0 1px;
54
+ padding:3px 10px;
55
+ text-align:center;
56
+ background:#eee;
57
+ color:#000;
58
+ text-decoration:none;
59
+ position:relative;
60
+ left:15px;
61
+ line-height:1.3em;
62
+ }
63
+ #header ul li a:hover {
64
+ background:#369;
65
+ color:#fff;
66
+ }
67
+ #header ul li a.active,
68
+ #header ul li a.active:hover {
69
+ color:#fff;
70
+ background:#000;
71
+ font-weight:bold;
72
+ }
73
+ #header ul li a span {
74
+ display:block;
75
+ }
76
+ /* 'widths' sub menu */
77
+ #layoutdims {
78
+ clear:both;
79
+ background:#eee;
80
+ border-top:4px solid #000;
81
+ margin:0;
82
+ padding:6px 15px !important;
83
+ text-align:right;
84
+ }
85
+ /* column container */
86
+ .colmask {
87
+ position:relative; /* This fixes the IE7 overflow hidden bug */
88
+ clear:both;
89
+ float:left;
90
+ width:100%; /* width of whole page */
91
+ overflow:hidden; /* This chops off any overhanging divs */
92
+ }
93
+ /* common column settings */
94
+ .colright,
95
+ .colmid,
96
+ .colleft {
97
+ float:left;
98
+ width:100%; /* width of page */
99
+ position:relative;
100
+ }
101
+ .col1,
102
+ .col2,
103
+ .col3 {
104
+ float:left;
105
+ position:relative;
106
+ padding:0 0 1em 0; /* no left and right padding on columns, we just make them narrower instead
107
+ only padding top and bottom is included here, make it whatever value you need */
108
+ overflow:hidden;
109
+ }
110
+ /* 3 Column settings */
111
+ .threecol {
112
+ background:#eee; /* right column background colour */
113
+ }
114
+ .threecol .colmid {
115
+ right:25%; /* width of the right column */
116
+ background:#fff; /* center column background colour */
117
+ }
118
+ .threecol .colleft {
119
+ right:50%; /* width of the middle column */
120
+ background:#f4f4f4; /* left column background colour */
121
+ }
122
+ .threecol .col1 {
123
+ width:46%; /* width of center column content (column width minus padding on either side) */
124
+ left:102%; /* 100% plus left padding of center column */
125
+ }
126
+ .threecol .col2 {
127
+ width:21%; /* Width of left column content (column width minus padding on either side) */
128
+ left:31%; /* width of (right column) plus (center column left and right padding) plus (left column left padding) */
129
+ }
130
+ .threecol .col3 {
131
+ width:21%; /* Width of right column content (column width minus padding on either side) */
132
+ left:85%; /* Please make note of the brackets here:
133
+ (100% - left column width) plus (center column left and right padding) plus (left column left and right padding) plus (right column left padding) */
134
+ }
135
+ /* Footer styles */
136
+ #footer {
137
+ clear:both;
138
+ float:left;
139
+ width:100%;
140
+ border-top:1px solid #000;
141
+ }
142
+ #footer p {
143
+ padding:10px;
144
+ margin:0;
145
+ }
146
+ /* --> */
147
+ </style>
148
+ </head>
149
+ <body>
150
+
151
+ <div id="header">
152
+ <p><a href="http://matthewjamestaylor.com/blog/perfect-multi-column-liquid-layouts" title="Perfect multi-column liquid layouts - iPhone compatible">&laquo; Back to the CSS article</a> by <a href="http://matthewjamestaylor.com">Matthew James Taylor</a></p>
153
+ <h1>The Perfect 3 Column Liquid Layout (Percentage widths)</h1>
154
+ <h2>No CSS hacks. SEO friendly. No Images. No JavaScript. Cross-browser &amp; iPhone compatible.</h2>
155
+ <ul>
156
+ <li><a href="http://matthewjamestaylor.com/blog/perfect-3-column.htm" class="active">3 Column <span>Holy Grail</span></a></li>
157
+ <li><a href="http://matthewjamestaylor.com/blog/perfect-3-column-blog-style.htm">3 Column <span>Blog Style</span></a></li>
158
+ <li><a href="http://matthewjamestaylor.com/blog/perfect-2-column-left-menu.htm">2 Column <span>Left Menu</span></a></li>
159
+ <li><a href="http://matthewjamestaylor.com/blog/perfect-2-column-right-menu.htm">2 Column <span>Right Menu</span></a></li>
160
+ <li><a href="http://matthewjamestaylor.com/blog/perfect-2-column-double-page.htm">2 Column <span>Double Page</span></a></li>
161
+ <li><a href="http://matthewjamestaylor.com/blog/perfect-full-page.htm">1 Column <span>Full Page</span></a></li>
162
+ <li><a href="http://matthewjamestaylor.com/blog/perfect-stacked-columns.htm">Stacked <span>columns</span></a></li>
163
+ </ul>
164
+ <p id="layoutdims">Measure columns in: <a href="http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-pixels.htm">Pixel widths</a> | <a href="http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-ems.htm">Em widths</a> | <strong>Percentage widths</strong></p>
165
+ </div>
166
+ <div class="colmask threecol">
167
+ <div class="colmid">
168
+ <div class="colleft">
169
+ <div class="col1">
170
+ <!-- Column 1 start -->
171
+ <h2>Percentage dimensions of the holy grail layout</h2>
172
+ <img src="http://matthewjamestaylor.com/blog/perfect-3-column-dimensions.gif" width="350" height="370" alt="Three column layout dimensions" />
173
+ <p>All the dimensions are in percentage widths so the layout adjusts to any screen resolution. Vertical dimensions are not set so they stretch to the height of the content.</p>
174
+ <h3>Maximum column content widths</h3>
175
+ <p>To prevent wide content (like long URLs) from destroying the layout (long content can make the page scroll horizontally) the column content divs are set to overflow:hidden. This chops off any content that is wider than the div. Because of this, it's important to know the maximum widths allowable at common screen resolutions. For example, if you choose 800 x 600 pixels as your minimum compatible resolution what is the widest image that can be safely added to each column before it gets chopped off? Here are the figures:</p>
176
+ <dl>
177
+ <dt><strong>800 x 600</strong></dt>
178
+ <dd>Left &amp; right columns: 162 pixels</dd>
179
+ <dd>Center page: 357 pixels</dd>
180
+ <dt><strong>1024 x 768</strong></dt>
181
+ <dd>Left &amp; right columns: 210 pixels</dd>
182
+ <dd>Center page: 459 pixels</dd>
183
+ </dl>
184
+ <h2>The nested div structure</h2>
185
+ <p>I've colour coded each div so it's easy to see:</p>
186
+ <img src="http://matthewjamestaylor.com/blog/perfect-3-column-div-structure.gif" width="350" height="369" alt="Three column layout nested div structure" />
187
+ <p>The header, colmask and footer divs are 100% wide and stacked vertically one after the other. Colmid is inside colmask and colleft is inside colmid. The three column content divs (col1, col2 &amp; col3) are inside colleft. Notice that the main content column (col1) comes before the other columns.</p>
188
+ <!-- Column 1 end -->
189
+ </div>
190
+ <div class="col2">
191
+ <!-- Column 2 start -->
192
+ <h2>No CSS hacks</h2>
193
+ <p>The CSS used for this layout is 100% valid and hack free. To overcome Internet Explorer's broken box model, no horizontal padding or margins are used. Instead, this design uses percentage widths and clever relative positioning.</p>
194
+ <h2>SEO friendly 2-1-3 column ordering</h2>
195
+ <p>The higher up content is in your page code, the more important it is considered by search engine algorithms. To make your website as optimised as possible your main page content must come before the side columns. This layout does exactly that: The center page comes first, then the left column and finally the right column (see the nested div structure diagram for more info). The columns can also be configured to any other order if required.</p>
196
+ <h2>Full length column background colours</h2>
197
+ <p>In this layout the background colours of each column will always stretch to the length of the longest column. This feature was traditionally only available with table based layouts but now with a little CSS trickery we can do exactly the same with divs. Say goodbye to annoying short columns!</p>
198
+ <h2>No Images</h2>
199
+ <p>This layout requires no images. Many CSS website designs need images to colour in the column backgrounds but that is not necessary with this design. Why waste bandwidth and precious HTTP requests when you can do everything in pure CSS and XHTML?</p>
200
+ <h2>No JavaScript</h2>
201
+ <p>JavaScript is not required. Some website layouts rely on JavaScript hacks to resize divs and force elements into place but you won't see any of that nonsense here.</p>
202
+ <h2>Resizable text compatible</h2>
203
+ <p>This layout is fully compatible with resizable text. Resizable text is important for web accessibility. People who are vision impaired can make the text larger so it's easier for them to read. It is becoming increasingly more important to make your website resizable text compatible because people are expecting higher levels of web accessibility. Apple have made resizing the text on a website simple with the pinch gesture on their multi-touch trackpad. So far this trackpad is only available on the MacBook Air but it will soon be rolled out to all of their systems. Is your website text-resizing compatible?</p>
204
+ <h2>No Quirks Mode</h2>
205
+ <p>This liquid layout does not require the XML declaration for it to display correctly in older versions of Internet Explorer. This version works without it and is thus never in quirks mode.</p>
206
+ <h2>No IE Conditional Comments</h2>
207
+ <p>Only one stylesheet is used with this layout This means that IE conditional comments are not needed to set extra CSS rules for older versions of Internet Explorer.</p>
208
+ <!-- Column 2 end -->
209
+ </div>
210
+ <div class="col3">
211
+ <!-- Column 3 start -->
212
+ <h2>Browser Compatibility</h2>
213
+ <p>This 3 column liquid Layout has been tested on the following browsers:</p>
214
+ <h3>iPhone &amp; iPod Touch</h3>
215
+ <ul>
216
+ <li>Safari</li>
217
+ </ul>
218
+ <h3>Mac</h3>
219
+ <ul>
220
+ <li>Safari</li>
221
+ <li>Firefox</li>
222
+ <li>Opera 9.25</li>
223
+ <li>Netscape 9.0.0.5 &amp; 7.1</li>
224
+ </ul>
225
+ <h3>Windows</h3>
226
+ <ul>
227
+ <li>Firefox 1.5, 2 &amp; 3</li>
228
+ <li>Safari</li>
229
+ <li>Opera 8.1 &amp; 9</li>
230
+ <li>Google Chrome</li>
231
+ <li>Explorer 5.5, 6 &amp; 7</li>
232
+ <li>Netscape 8</li>
233
+ </ul>
234
+ <h2>Valid XHTML strict markup</h2>
235
+ <p>The HTML in this layout validates as XHTML 1.0 strict.</p>
236
+ <h2>This layout is FREE for anyone to use</h2>
237
+ <p>That's right, you don't have to pay anything. Simply view the source of this page and save the HTML onto your computer. My only suggestion is to put the CSS into a separate file. If you are feeling generous however, link back to this page so other people can find and use this layout too.</p>
238
+ <!-- Column 3 end -->
239
+ </div>
240
+ </div>
241
+ </div>
242
+ </div>
243
+ <div id="footer">
244
+ <p>This page uses the <a href="http://matthewjamestaylor.com/blog/perfect-3-column.htm">Perfect 'Holy Grail' 3 Column Liquid Layout</a> by <a href="http://matthewjamestaylor.com">Matthew James Taylor</a>. View more <a href="http://matthewjamestaylor.com/blog/-website-layouts">website layouts</a> and <a href="http://matthewjamestaylor.com/blog/-web-design">web design articles</a>.</p>
245
+ </div>
246
+
247
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
248
+ </script>
249
+ <script type="text/javascript">
250
+ _uacct = "UA-1848067-8";
251
+ urchinTracker();
252
+ </script>
253
+
254
+ </body>
255
+ </html>