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.
- data/MIT-LICENSE +20 -0
- data/README.textile +138 -0
- data/Rakefile +39 -0
- data/app/helpers/layout_helper.rb +44 -0
- data/app/views/layouts/1_column_em.html.erb +110 -0
- data/app/views/layouts/1_column_percentage.html.erb +127 -0
- data/app/views/layouts/1_column_pixel.html.erb +110 -0
- data/app/views/layouts/2_column_left_menu_em.html.erb +209 -0
- data/app/views/layouts/2_column_left_menu_percentage.html.erb +181 -0
- data/app/views/layouts/2_column_left_menu_pixel.html.erb +216 -0
- data/app/views/layouts/2_column_right_menu_em.html.erb +204 -0
- data/app/views/layouts/2_column_right_menu_percentage.html.erb +227 -0
- data/app/views/layouts/2_column_right_menu_pixel.html.erb +240 -0
- data/app/views/layouts/3_column_blog_em.html.erb +257 -0
- data/app/views/layouts/3_column_blog_percentage.html.erb +255 -0
- data/app/views/layouts/3_column_blog_pixel.html.erb +268 -0
- data/app/views/layouts/3_column_holy_grail_em.html.erb +262 -0
- data/app/views/layouts/3_column_holy_grail_percentage.html.erb +255 -0
- data/app/views/layouts/3_column_holy_grail_pixel.html.erb +262 -0
- data/app/views/layouts/_body.html.erb +7 -0
- data/app/views/layouts/_column_1.html.erb +5 -0
- data/app/views/layouts/_column_2.html.erb +5 -0
- data/app/views/layouts/_column_3.html.erb +5 -0
- data/app/views/layouts/_flashes.html.erb +15 -0
- data/app/views/layouts/_footer.html.erb +5 -0
- data/app/views/layouts/_google_analytics_tracker.html.erb +8 -0
- data/app/views/layouts/_head.html.erb +23 -0
- data/app/views/layouts/_header.html.erb +5 -0
- data/app/views/layouts/_image_replacement.html.erb +3 -0
- data/app/views/layouts/_javascript_includes.html.erb +1 -0
- data/app/views/layouts/_layout_and_theme_stylesheets.html.erb +8 -0
- data/app/views/layouts/stacked_columns.html.erb +418 -0
- data/assets/bluetrip-css-framework/LICENSE +312 -0
- data/assets/bluetrip-css-framework/README.rst +37 -0
- data/assets/bluetrip-css-framework/css/ie.css +21 -0
- data/assets/bluetrip-css-framework/css/print.css +49 -0
- data/assets/bluetrip-css-framework/css/screen.css +409 -0
- data/assets/bluetrip-css-framework/css/style.css +7 -0
- data/assets/bluetrip-css-framework/examples/grid.html +232 -0
- data/assets/bluetrip-css-framework/examples/index.html +263 -0
- data/assets/bluetrip-css-framework/examples/test-small.jpg +0 -0
- data/assets/bluetrip-css-framework/img/grid.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/cross.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/doc.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/email.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/external.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/feed.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/im.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/information.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/key.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/pdf.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/tick.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/visited.png +0 -0
- data/assets/bluetrip-css-framework/img/icons/xls.png +0 -0
- data/init.rb +1 -0
- data/install.rb +1 -0
- data/lib/chaise.rb +9 -0
- data/origami.gemspec +118 -0
- data/public/stylesheets/1_column_em.css +117 -0
- data/public/stylesheets/1_column_percentage.css +134 -0
- data/public/stylesheets/1_column_pixel.css +117 -0
- data/public/stylesheets/2_column_left_menu_em.css +149 -0
- data/public/stylesheets/2_column_left_menu_percentage.css +142 -0
- data/public/stylesheets/2_column_left_menu_pixel.css +149 -0
- data/public/stylesheets/2_column_right_menu_em.css +148 -0
- data/public/stylesheets/2_column_right_menu_percentage.css +142 -0
- data/public/stylesheets/2_column_right_menu_pixel.css +148 -0
- data/public/stylesheets/3_column_blog_pixel.css +162 -0
- data/rails/init.rb +1 -0
- data/rdoc/classes/ApplicationController.html +151 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/README_textile.html +363 -0
- data/rdoc/files/lib/chaise_rb.html +101 -0
- data/rdoc/fr_class_index.html +27 -0
- data/rdoc/fr_file_index.html +28 -0
- data/rdoc/fr_method_index.html +27 -0
- data/rdoc/index.html +24 -0
- data/rdoc/rdoc-style.css +208 -0
- data/tasks/chaise_tasks.rake +15 -0
- data/test/chaise_test.rb +26 -0
- data/test/test_helper.rb +3 -0
- data/uninstall.rb +1 -0
- metadata +136 -0
@@ -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 (blog style): 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 (blog style): No CSS hacks. SEO friendly. iPhone compatible." />
|
7
|
+
<meta name="keywords" content="The Perfect 3 Column Liquid Layout (blog style): 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 blog style settings */
|
111
|
+
.blogstyle {
|
112
|
+
background:#eee; /* right column background colour */
|
113
|
+
}
|
114
|
+
.blogstyle .colmid {
|
115
|
+
right:25%; /* width of the right column */
|
116
|
+
background:#f4f4f4; /* center column background colour */
|
117
|
+
}
|
118
|
+
.blogstyle .colleft {
|
119
|
+
right:25%; /* width of the middle column */
|
120
|
+
background:#fff; /* left column background colour */
|
121
|
+
}
|
122
|
+
.blogstyle .col1 {
|
123
|
+
width:46%; /* width of center column content (column width minus padding on either side) */
|
124
|
+
left:52%; /* 100% plus left padding of center column */
|
125
|
+
}
|
126
|
+
.blogstyle .col2 {
|
127
|
+
width:21%; /* Width of left column content (column width minus padding on either side) */
|
128
|
+
left:56%; /* width of (right column) plus (center column left and right padding) plus (left column left padding) */
|
129
|
+
}
|
130
|
+
.blogstyle .col3 {
|
131
|
+
width:21%; /* Width of right column content (column width minus padding on either side) */
|
132
|
+
left:60%; /* 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">« Back to the CSS article</a> by <a href="http://matthewjamestaylor.com">Matthew James Taylor</a></p>
|
153
|
+
<h1>The Perfect 'Blog Style' 3 Column Liquid Layout (Percentage widths)</h1>
|
154
|
+
<h2>No CSS hacks. SEO friendly. No Images. No JavaScript. Cross-browser & iPhone compatible.</h2>
|
155
|
+
<ul>
|
156
|
+
<li><a href="http://matthewjamestaylor.com/blog/perfect-3-column.htm">3 Column <span>Holy Grail</span></a></li>
|
157
|
+
<li><a href="http://matthewjamestaylor.com/blog/perfect-3-column-blog-style.htm" class="active">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-blog-style-pixels.htm">Pixel widths</a> | <a href="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-ems.htm">Em widths</a> | <strong>Percentage widths</strong></p>
|
165
|
+
</div>
|
166
|
+
<div class="colmask blogstyle">
|
167
|
+
<div class="colmid">
|
168
|
+
<div class="colleft">
|
169
|
+
<div class="col1">
|
170
|
+
<!-- Column 1 start -->
|
171
|
+
<h2>Percentage dimensions of the blog style layout</h2>
|
172
|
+
<img src="http://matthewjamestaylor.com/blog/perfect-3-column-blog-style-dimensions.gif" width="350" height="370" alt="Blog style 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>Center & right columns: 162 pixels</dd>
|
179
|
+
<dd>Left page: 357 pixels</dd>
|
180
|
+
<dt><strong>1024 x 768</strong></dt>
|
181
|
+
<dd>Center & right columns: 210 pixels</dd>
|
182
|
+
<dd>Left 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-blog-style-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 & 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</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 Left page comes first, then the center 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 & 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 & 7.1</li>
|
224
|
+
</ul>
|
225
|
+
<h3>Windows</h3>
|
226
|
+
<ul>
|
227
|
+
<li>Firefox 1.5, 2 & 3</li>
|
228
|
+
<li>Safari</li>
|
229
|
+
<li>Opera 8.1 & 9</li>
|
230
|
+
<li>Google Chrome</li>
|
231
|
+
<li>Explorer 5.5, 6 & 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-blog-style.htm">Perfect 'Blog Style' 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>
|
@@ -0,0 +1,268 @@
|
|
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
|
+
<% head do %>
|
6
|
+
<title>The Blog Style 3 column Liquid Layout. Pixel widths. Cross-Browser. Equal Height Columns.</title>
|
7
|
+
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
8
|
+
<meta name="description" content="The Blog Style 3 column Liquid Layout. Pixel widths. Cross-Browser. Equal Height Columns." />
|
9
|
+
<meta name="keywords" content="The Blog Style 3 column Liquid Layout. Pixel widths. Cross-Browser. Equal Height Columns." />
|
10
|
+
<meta name="robots" content="index, follow" />
|
11
|
+
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
12
|
+
<% end %>
|
13
|
+
<% layout_and_theme_stylesheets '3_column_blog_pixel' do %>
|
14
|
+
<style media="screen" type="text/css">
|
15
|
+
/* <!-- */
|
16
|
+
/* General styles */
|
17
|
+
body {
|
18
|
+
margin:0;
|
19
|
+
padding:0;
|
20
|
+
border:0; /* This removes the border around the viewport in old versions of IE */
|
21
|
+
width:100%;
|
22
|
+
background:#fff;
|
23
|
+
min-width:600px; /* Minimum width of layout - remove line if not required */
|
24
|
+
/* The min-width property does not work in old versions of Internet Explorer */
|
25
|
+
}
|
26
|
+
/* Header styles */
|
27
|
+
#header {
|
28
|
+
clear:both;
|
29
|
+
float:left;
|
30
|
+
width:100%;
|
31
|
+
}
|
32
|
+
#header {
|
33
|
+
border-bottom:1px solid #000;
|
34
|
+
}
|
35
|
+
#header p,
|
36
|
+
#header h1,
|
37
|
+
#header h2 {
|
38
|
+
padding:.4em 15px 0 15px;
|
39
|
+
margin:0;
|
40
|
+
}
|
41
|
+
#header ul {
|
42
|
+
clear:left;
|
43
|
+
float:left;
|
44
|
+
width:100%;
|
45
|
+
list-style:none;
|
46
|
+
margin:10px 0 0 0;
|
47
|
+
padding:0;
|
48
|
+
}
|
49
|
+
#header ul li {
|
50
|
+
display:inline;
|
51
|
+
list-style:none;
|
52
|
+
margin:0;
|
53
|
+
padding:0;
|
54
|
+
}
|
55
|
+
#header ul li a {
|
56
|
+
display:block;
|
57
|
+
float:left;
|
58
|
+
margin:0 0 0 1px;
|
59
|
+
padding:3px 10px;
|
60
|
+
text-align:center;
|
61
|
+
background:#eee;
|
62
|
+
color:#000;
|
63
|
+
text-decoration:none;
|
64
|
+
position:relative;
|
65
|
+
left:15px;
|
66
|
+
line-height:1.3em;
|
67
|
+
}
|
68
|
+
#header ul li a:hover {
|
69
|
+
background:#369;
|
70
|
+
color:#fff;
|
71
|
+
}
|
72
|
+
#header ul li a.active,
|
73
|
+
#header ul li a.active:hover {
|
74
|
+
color:#fff;
|
75
|
+
background:#000;
|
76
|
+
font-weight:bold;
|
77
|
+
}
|
78
|
+
#header ul li a span {
|
79
|
+
display:block;
|
80
|
+
}
|
81
|
+
/* 'widths' sub menu */
|
82
|
+
#layoutdims {
|
83
|
+
clear:both;
|
84
|
+
background:#eee;
|
85
|
+
border-top:4px solid #000;
|
86
|
+
margin:0;
|
87
|
+
padding:6px 15px !important;
|
88
|
+
text-align:right;
|
89
|
+
}
|
90
|
+
/* column container */
|
91
|
+
.colmask {
|
92
|
+
position:relative; /* This fixes the IE7 overflow hidden bug and stops the layout jumping out of place */
|
93
|
+
clear:both;
|
94
|
+
float:left;
|
95
|
+
width:100%; /* width of whole page */
|
96
|
+
overflow:hidden; /* This chops off any overhanging divs */
|
97
|
+
}
|
98
|
+
/* 3 column blog style settings */
|
99
|
+
.blogstyle {
|
100
|
+
background:#ff9; /* Right column background colour */
|
101
|
+
}
|
102
|
+
.blogstyle .colmid {
|
103
|
+
float:left;
|
104
|
+
width:200%;
|
105
|
+
margin-left:-200px; /* Width of right column */
|
106
|
+
position:relative;
|
107
|
+
right:100%;
|
108
|
+
background:#FFD8B7; /* Centre column background colour */
|
109
|
+
}
|
110
|
+
.blogstyle .colleft {
|
111
|
+
float:left;
|
112
|
+
width:100%;
|
113
|
+
margin-left:-200px; /* Width of centre column */
|
114
|
+
background:#fff; /* Left column background colour */
|
115
|
+
}
|
116
|
+
.blogstyle .col1wrap {
|
117
|
+
float:left;
|
118
|
+
width:50%;
|
119
|
+
padding-bottom:1em; /* Centre column bottom padding. Leave it out if it's zero */
|
120
|
+
}
|
121
|
+
.blogstyle .col1 {
|
122
|
+
margin:0 15px 0 415px; /* Centre column side padding:
|
123
|
+
Left padding = left column width + centre column left padding width
|
124
|
+
Right padding = right column width + centre column right padding width */
|
125
|
+
position:relative;
|
126
|
+
left:100%;
|
127
|
+
overflow:hidden;
|
128
|
+
}
|
129
|
+
.blogstyle .col2 {
|
130
|
+
float:right;
|
131
|
+
width:170px; /* Width of left column content (left column width minus left and right padding) */
|
132
|
+
position:relative;
|
133
|
+
left:185px; /* Width of the left-had side padding on the left column */
|
134
|
+
}
|
135
|
+
.blogstyle .col3 {
|
136
|
+
float:right;
|
137
|
+
width:170px; /* Width of right column content (right column width minus left and right padding) */
|
138
|
+
position:relative;
|
139
|
+
left:555px;
|
140
|
+
}
|
141
|
+
/* Footer styles */
|
142
|
+
#footer {
|
143
|
+
clear:both;
|
144
|
+
float:left;
|
145
|
+
width:100%;
|
146
|
+
border-top:1px solid #000;
|
147
|
+
}
|
148
|
+
#footer p {
|
149
|
+
padding:10px;
|
150
|
+
margin:0;
|
151
|
+
}
|
152
|
+
/* --> */
|
153
|
+
</style>
|
154
|
+
<!--[if lt IE 7]>
|
155
|
+
<style media="screen" type="text/css">
|
156
|
+
.col1 {
|
157
|
+
width:100%;
|
158
|
+
}
|
159
|
+
</style>
|
160
|
+
<![endif]-->
|
161
|
+
<% end %>
|
162
|
+
</head>
|
163
|
+
<body>
|
164
|
+
|
165
|
+
<% frame do %>
|
166
|
+
|
167
|
+
<div id="header">
|
168
|
+
<% header do %>
|
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)">« Back to the CSS article</a> by <a href="http://matthewjamestaylor.com">Matthew James Taylor</a></p>
|
170
|
+
<h1>The 'Blog Style' 3 column Liquid Layout (Pixel-widths)</h1>
|
171
|
+
<h2>No CSS hacks. SEO friendly. Cross-browser. Equal height columns.</h2>
|
172
|
+
<ul>
|
173
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-pixels.htm">3 Column <span>Holy Grail</span></a></li>
|
174
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-pixels.htm" class="active">3 Column <span>Blog Style</span></a></li>
|
175
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-2-column-left-menu-pixels.htm">2 Column <span>Left Menu</span></a></li>
|
176
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-2-column-right-menu-pixels.htm">2 Column <span>Right Menu</span></a></li>
|
177
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-1-column-full-page-pixels.htm">1 Column <span>Full Page</span></a></li>
|
178
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-stacked-columns-pixels.htm">Stacked <span>Columns</span></a></li>
|
179
|
+
</ul>
|
180
|
+
<p id="layoutdims">Measure columns in: <strong>Pixel widths</strong> | <a href="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-ems.htm">Em widths</a> | <a href="http://matthewjamestaylor.com/blog/perfect-3-column-blog-style.htm">Percentage widths</a></p>
|
181
|
+
<% end %>
|
182
|
+
</div>
|
183
|
+
<div class="colmask blogstyle">
|
184
|
+
<div class="colmid">
|
185
|
+
<div class="colleft">
|
186
|
+
<div class="col1wrap">
|
187
|
+
<div class="col1">
|
188
|
+
<% column_1 do %>
|
189
|
+
<!-- Column 1 start -->
|
190
|
+
<h2>Pixel dimensions of the blog style layout</h2>
|
191
|
+
<img src="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-pixels-dimensions.gif" width="350" height="370" alt="Blog style three column layout pixel dimensions" />
|
192
|
+
<p>In this layout the center and right column widths are in pixels and the left 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 pixel widths are great for images because you can make them fit perfectly within a column without gaps.</p>
|
193
|
+
<h2>The nested div structure</h2>
|
194
|
+
<p>I've colour coded each div so it's easy to see:</p>
|
195
|
+
<img src="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-div-structure.gif" width="350" height="369" alt="Blog style three column layout nested div structure" />
|
196
|
+
<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 center and right content columns are inside colleft. The left 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-blog-style.htm">percentage width version</a>). Notice that the main content column (col1) comes before the other columns, this is great for SEO.</p>
|
197
|
+
<!-- Column 1 end -->
|
198
|
+
<% end %>
|
199
|
+
</div>
|
200
|
+
</div>
|
201
|
+
<div class="col2">
|
202
|
+
<% column_2 do %>
|
203
|
+
<!-- Column 2 start -->
|
204
|
+
<h2>No CSS hacks</h2>
|
205
|
+
<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>
|
206
|
+
<h2>SEO friendly 2-1-3 column ordering</h2>
|
207
|
+
<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>
|
208
|
+
<h2>Equal height columns</h2>
|
209
|
+
<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>
|
210
|
+
<h2>No Images</h2>
|
211
|
+
<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>
|
212
|
+
<h2>No JavaScript</h2>
|
213
|
+
<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>
|
214
|
+
<!-- Column 2 end -->
|
215
|
+
<% end %>
|
216
|
+
</div>
|
217
|
+
<div class="col3">
|
218
|
+
<% column_3 do %>
|
219
|
+
<!-- Column 3 start -->
|
220
|
+
<h2>Full cross-browser support</h2>
|
221
|
+
<p>The blog style 3 column liquid Layout has been tested on the following browsers:</p>
|
222
|
+
|
223
|
+
<h3>iPhone & iPod Touch</h3>
|
224
|
+
<ul>
|
225
|
+
<li>Safari</li>
|
226
|
+
</ul>
|
227
|
+
<h3>Mac</h3>
|
228
|
+
<ul>
|
229
|
+
<li>Safari</li>
|
230
|
+
<li>Firefox</li>
|
231
|
+
<li>Opera 9.25</li>
|
232
|
+
<li>Netscape 9.0.0.5 & 7.1</li>
|
233
|
+
</ul>
|
234
|
+
<h3>Windows</h3>
|
235
|
+
<ul>
|
236
|
+
<li>Firefox 1.5 & 2</li>
|
237
|
+
|
238
|
+
<li>Safari</li>
|
239
|
+
<li>Opera 8.1 & 9</li>
|
240
|
+
<li>Explorer 5.5, 6 & 7</li>
|
241
|
+
<li>Netscape 8</li>
|
242
|
+
</ul>
|
243
|
+
<h2>Valid XHTML strict markup</h2>
|
244
|
+
<p>The HTML in this layout validates as XHTML 1.0 strict.</p>
|
245
|
+
<h2>Resizable text compatible</h2>
|
246
|
+
<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>
|
247
|
+
<h2>FREE for anyone to use</h2>
|
248
|
+
<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>
|
249
|
+
<h2>Free traffic for your website</h2>
|
250
|
+
<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>
|
251
|
+
<!-- Column 3 end -->
|
252
|
+
<% end %>
|
253
|
+
</div>
|
254
|
+
</div>
|
255
|
+
</div>
|
256
|
+
</div>
|
257
|
+
<div id="footer">
|
258
|
+
<% footer do %>
|
259
|
+
<p>This page uses the <a href="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-pixels.htm">Ultimate 'Blog Style' 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>
|
260
|
+
<% end %>
|
261
|
+
</div>
|
262
|
+
|
263
|
+
<% end %>
|
264
|
+
|
265
|
+
<%= google_analytics_tracker GOOGLE_ANALYTICS_ACCOUNT if defined?(GOOGLE_ANALYTICS_ACCOUNT) -%>
|
266
|
+
|
267
|
+
</body>
|
268
|
+
</html>
|