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,240 @@
|
|
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 do %>
|
5
|
+
<title>The Right Menu 2 column Liquid Layout. Pixel 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 Right Menu 2 column Liquid Layout. Pixel widths. Cross-Browser. Equal Height Columns." />
|
8
|
+
<meta name="keywords" content="The Right Menu 2 column Liquid Layout. Pixel 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
|
+
|
12
|
+
<% layout_and_theme_stylesheets '2_column_right_menu_pixel' do %>
|
13
|
+
<style media="screen" type="text/css">
|
14
|
+
/* <!-- */
|
15
|
+
/* General styles */
|
16
|
+
body {
|
17
|
+
margin:0;
|
18
|
+
padding:0;
|
19
|
+
border:0; /* This removes the border around the viewport in old versions of IE */
|
20
|
+
width:100%;
|
21
|
+
min-width:600px; /* Minimum width of layout - remove line if not required */
|
22
|
+
/* The min-width property does not work in old versions of Internet Explorer */
|
23
|
+
}
|
24
|
+
/* Header styles */
|
25
|
+
#header {
|
26
|
+
clear:both;
|
27
|
+
float:left;
|
28
|
+
width:100%;
|
29
|
+
}
|
30
|
+
#header {
|
31
|
+
border-bottom:1px solid #000;
|
32
|
+
}
|
33
|
+
#header p,
|
34
|
+
#header h1,
|
35
|
+
#header h2 {
|
36
|
+
padding:.4em 15px 0 15px;
|
37
|
+
margin:0;
|
38
|
+
}
|
39
|
+
#header ul {
|
40
|
+
clear:left;
|
41
|
+
float:left;
|
42
|
+
width:100%;
|
43
|
+
list-style:none;
|
44
|
+
margin:10px 0 0 0;
|
45
|
+
padding:0;
|
46
|
+
}
|
47
|
+
#header ul li {
|
48
|
+
display:inline;
|
49
|
+
list-style:none;
|
50
|
+
margin:0;
|
51
|
+
padding:0;
|
52
|
+
}
|
53
|
+
#header ul li a {
|
54
|
+
display:block;
|
55
|
+
float:left;
|
56
|
+
margin:0 0 0 1px;
|
57
|
+
padding:3px 10px;
|
58
|
+
text-align:center;
|
59
|
+
background:#eee;
|
60
|
+
color:#000;
|
61
|
+
text-decoration:none;
|
62
|
+
position:relative;
|
63
|
+
left:15px;
|
64
|
+
line-height:1.3em;
|
65
|
+
}
|
66
|
+
#header ul li a:hover {
|
67
|
+
background:#369;
|
68
|
+
color:#fff;
|
69
|
+
}
|
70
|
+
#header ul li a.active,
|
71
|
+
#header ul li a.active:hover {
|
72
|
+
color:#fff;
|
73
|
+
background:#000;
|
74
|
+
font-weight:bold;
|
75
|
+
}
|
76
|
+
#header ul li a span {
|
77
|
+
display:block;
|
78
|
+
}
|
79
|
+
/* 'widths' sub menu */
|
80
|
+
#layoutdims {
|
81
|
+
clear:both;
|
82
|
+
background:#eee;
|
83
|
+
border-top:4px solid #000;
|
84
|
+
margin:0;
|
85
|
+
padding:6px 15px !important;
|
86
|
+
text-align:right;
|
87
|
+
}
|
88
|
+
/* column container */
|
89
|
+
.colmask {
|
90
|
+
position:relative; /* This fixes the IE7 overflow hidden bug and stops the layout jumping out of place */
|
91
|
+
clear:both;
|
92
|
+
float:left;
|
93
|
+
width:100%; /* width of whole page */
|
94
|
+
overflow:hidden; /* This chops off any overhanging divs */
|
95
|
+
}
|
96
|
+
/* 2 column right menu settings */
|
97
|
+
.rightmenu {
|
98
|
+
background:#ff9;
|
99
|
+
}
|
100
|
+
.rightmenu .colleft {
|
101
|
+
float:left;
|
102
|
+
width:200%;
|
103
|
+
margin-left:-200px;
|
104
|
+
position:relative;
|
105
|
+
right:100%;
|
106
|
+
background:#fff;
|
107
|
+
}
|
108
|
+
.rightmenu .col1wrap {
|
109
|
+
float:left;
|
110
|
+
width:50%;
|
111
|
+
position:relative;
|
112
|
+
left:50%;
|
113
|
+
padding-bottom:1em;
|
114
|
+
}
|
115
|
+
.rightmenu .col1 {
|
116
|
+
margin:0 15px 0 215px;
|
117
|
+
overflow:hidden;
|
118
|
+
}
|
119
|
+
.rightmenu .col2 {
|
120
|
+
float:right;
|
121
|
+
width:170px;
|
122
|
+
position:relative;
|
123
|
+
left:185px;
|
124
|
+
}
|
125
|
+
/* Footer styles */
|
126
|
+
#footer {
|
127
|
+
clear:both;
|
128
|
+
float:left;
|
129
|
+
width:100%;
|
130
|
+
border-top:1px solid #000;
|
131
|
+
}
|
132
|
+
#footer p {
|
133
|
+
padding:10px;
|
134
|
+
margin:0;
|
135
|
+
}
|
136
|
+
/* --> */
|
137
|
+
</style>
|
138
|
+
<!--[if lt IE 7]>
|
139
|
+
<style media="screen" type="text/css">
|
140
|
+
.col1 {
|
141
|
+
width:100%;
|
142
|
+
}
|
143
|
+
</style>
|
144
|
+
<![endif]-->
|
145
|
+
<% end %>
|
146
|
+
<% end %>
|
147
|
+
|
148
|
+
<% body do %>
|
149
|
+
|
150
|
+
<div id="header">
|
151
|
+
<%- header do -%>
|
152
|
+
<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>
|
153
|
+
<h1>The 'Right Menu' 2 column Liquid Layout (Pixel-widths)</h1>
|
154
|
+
<h2>No CSS hacks. SEO friendly. Cross-browser. Equal height columns.</h2>
|
155
|
+
<ul>
|
156
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-pixels.htm">3 Column <span>Holy Grail</span></a></li>
|
157
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-pixels.htm">3 Column <span>Blog Style</span></a></li>
|
158
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-2-column-left-menu-pixels.htm">2 Column <span>Left Menu</span></a></li>
|
159
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-2-column-right-menu-pixels.htm" class="active">2 Column <span>Right Menu</span></a></li>
|
160
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-1-column-full-page-pixels.htm">1 Column <span>Full Page</span></a></li>
|
161
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-stacked-columns-pixels.htm">Stacked <span>Columns</span></a></li>
|
162
|
+
</ul>
|
163
|
+
<p id="layoutdims">Measure columns in: <strong>Pixel widths</strong> | <a href="http://matthewjamestaylor.com/blog/ultimate-2-column-right-menu-ems.htm">Em widths</a> | <a href="http://matthewjamestaylor.com/blog/perfect-2-column-right-menu.htm">Percentage widths</a></p>
|
164
|
+
<%- end -%>
|
165
|
+
</div>
|
166
|
+
<div class="colmask rightmenu">
|
167
|
+
<div class="colleft">
|
168
|
+
<div class="col1wrap">
|
169
|
+
<div class="col1">
|
170
|
+
<%= render :partial => 'layouts/flashes' -%>
|
171
|
+
<% column_1 do %>
|
172
|
+
<!-- Column 1 start -->
|
173
|
+
<h2>Pixel dimensions of the right menu layout</h2>
|
174
|
+
<img src="http://matthewjamestaylor.com/blog/ultimate-2-column-right-menu-pixels-dimensions.gif" width="350" height="370" alt="Two column right menu layout pixel dimensions" />
|
175
|
+
<p>In this layout the right side column width is in pixels and the main 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>
|
176
|
+
<h2>The nested div structure</h2>
|
177
|
+
<p>I've colour coded each div so it's easy to see:</p>
|
178
|
+
<img src="http://matthewjamestaylor.com/blog/ultimate-2-column-right-menu-div-structure.gif" width="350" height="369" alt="Two column right menu layout nested div structure" />
|
179
|
+
<p>The header, colmask and footer divs are 100% wide and stacked vertically one after the other. Colleft is inside colmask and the right content column is inside colleft. The main 'left' page needs to be inside the col1wrap div so it can be positioned correctly (This extra div is not required on the <a href="perfect-2-column-right-menu.htm">percentage width version</a>). Notice that the main content column (col1) comes before the left column, this is great for SEO.</p>
|
180
|
+
<h2>Full cross-browser support</h2>
|
181
|
+
<p>The holy grail 3 column liquid Layout has been tested on the following browsers:</p>
|
182
|
+
<h3>iPhone & iPod Touch</h3>
|
183
|
+
<ul>
|
184
|
+
<li>Safari</li>
|
185
|
+
</ul>
|
186
|
+
<h3>Mac</h3>
|
187
|
+
<ul>
|
188
|
+
<li>Safari</li>
|
189
|
+
<li>Firefox</li>
|
190
|
+
<li>Opera 9.25</li>
|
191
|
+
<li>Netscape 9.0.0.5 & 7.1</li>
|
192
|
+
</ul>
|
193
|
+
<h3>Windows</h3>
|
194
|
+
<ul>
|
195
|
+
<li>Firefox 1.5 & 2</li>
|
196
|
+
<li>Safari</li>
|
197
|
+
<li>Opera 8.1 & 9</li>
|
198
|
+
<li>Explorer 5.5, 6 & 7</li>
|
199
|
+
<li>Netscape 8</li>
|
200
|
+
</ul>
|
201
|
+
<h2>FREE for anyone to use</h2>
|
202
|
+
<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>
|
203
|
+
<h2>Free traffic for your website</h2>
|
204
|
+
<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>
|
205
|
+
<!-- Column 1 end -->
|
206
|
+
<% end %>
|
207
|
+
</div>
|
208
|
+
</div>
|
209
|
+
<div class="col2">
|
210
|
+
<% column_2 do %>
|
211
|
+
<!-- Column 2 start -->
|
212
|
+
<h2>No CSS hacks</h2>
|
213
|
+
<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>
|
214
|
+
<h2>SEO friendly 1-2 column ordering</h2>
|
215
|
+
<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>
|
216
|
+
<h2>Equal height columns</h2>
|
217
|
+
<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>
|
218
|
+
<h2>No Images</h2>
|
219
|
+
<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>
|
220
|
+
<h2>No JavaScript</h2>
|
221
|
+
<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>
|
222
|
+
<h2>Valid XHTML strict markup</h2>
|
223
|
+
<p>The HTML in this layout validates as XHTML 1.0 strict.</p>
|
224
|
+
<h2>Resizable text compatible</h2>
|
225
|
+
<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>
|
226
|
+
<!-- Column 2 end -->
|
227
|
+
<% end %>
|
228
|
+
</div>
|
229
|
+
</div>
|
230
|
+
</div>
|
231
|
+
<div id="footer">
|
232
|
+
<% footer do %>
|
233
|
+
<p>This page uses the <a href="http://matthewjamestaylor.com/blog/ultimate-2-column-right-menu-pixels.htm">Ultimate 'Right Menu' 2 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>
|
234
|
+
<% end %>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
<%= google_analytics_tracker GOOGLE_ANALYTICS_ACCOUNT if defined?(GOOGLE_ANALYTICS_ACCOUNT) -%>
|
238
|
+
|
239
|
+
<% end %>
|
240
|
+
</html>
|
@@ -0,0 +1,257 @@
|
|
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 Blog Style 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 Blog Style 3 column Liquid Layout. Em widths. Cross-Browser. Equal Height Columns." />
|
8
|
+
<meta name="keywords" content="The Blog Style 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
|
+
/* 3 column blog style settings */
|
96
|
+
.blogstyle {
|
97
|
+
background:#CDEAFF; /* Right column background colour */
|
98
|
+
}
|
99
|
+
.blogstyle .colmid {
|
100
|
+
float:left;
|
101
|
+
width:200%;
|
102
|
+
margin-left:-12em; /* Width of right column */
|
103
|
+
position:relative;
|
104
|
+
right:100%;
|
105
|
+
background:#cfc; /* Centre column background colour */
|
106
|
+
}
|
107
|
+
.blogstyle .colleft {
|
108
|
+
float:left;
|
109
|
+
width:100%;
|
110
|
+
margin-left:-12em; /* Width of centre column */
|
111
|
+
background:#fff; /* Left column background colour */
|
112
|
+
}
|
113
|
+
.blogstyle .col1wrap {
|
114
|
+
float:left;
|
115
|
+
width:50%;
|
116
|
+
padding-bottom:1em; /* Centre column bottom padding. Leave it out if it's zero */
|
117
|
+
}
|
118
|
+
.blogstyle .col1 {
|
119
|
+
margin:0 1em 0 25em; /* Centre column side padding:
|
120
|
+
Left padding = left column width + centre column left padding width
|
121
|
+
Right padding = right column width + centre column right padding width */
|
122
|
+
position:relative;
|
123
|
+
left:100%;
|
124
|
+
overflow:hidden;
|
125
|
+
}
|
126
|
+
.blogstyle .col2 {
|
127
|
+
float:right;
|
128
|
+
width:10em; /* Width of left column content (left column width minus left and right padding) */
|
129
|
+
position:relative;
|
130
|
+
left:11em; /* Width of the left-had side padding on the left column */
|
131
|
+
}
|
132
|
+
.blogstyle .col3 {
|
133
|
+
float:right;
|
134
|
+
width:10em; /* Width of right column content (right column width minus left and right padding) */
|
135
|
+
position:relative;
|
136
|
+
left:33em;
|
137
|
+
}
|
138
|
+
/* Footer styles */
|
139
|
+
#footer {
|
140
|
+
clear:both;
|
141
|
+
float:left;
|
142
|
+
width:100%;
|
143
|
+
border-top:1px solid #000;
|
144
|
+
}
|
145
|
+
#footer p {
|
146
|
+
padding:10px;
|
147
|
+
margin:0;
|
148
|
+
}
|
149
|
+
/* --> */
|
150
|
+
</style>
|
151
|
+
<!--[if lt IE 7]>
|
152
|
+
<style media="screen" type="text/css">
|
153
|
+
.col1 {
|
154
|
+
width:100%;
|
155
|
+
}
|
156
|
+
</style>
|
157
|
+
<![endif]-->
|
158
|
+
</head>
|
159
|
+
<body>
|
160
|
+
|
161
|
+
<div id="header">
|
162
|
+
<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>
|
163
|
+
<h1>The 'Blog Style' 3 column Liquid Layout (Em-widths)</h1>
|
164
|
+
<h2>No CSS hacks. SEO friendly. Cross-browser. Equal height columns.</h2>
|
165
|
+
<ul>
|
166
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-ems.htm">3 Column <span>Holy Grail</span></a></li>
|
167
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-ems.htm" class="active">3 Column <span>Blog Style</span></a></li>
|
168
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-2-column-left-menu-ems.htm">2 Column <span>Left Menu</span></a></li>
|
169
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-2-column-right-menu-ems.htm">2 Column <span>Right Menu</span></a></li>
|
170
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-1-column-full-page-ems.htm">1 Column <span>Full Page</span></a></li>
|
171
|
+
<li><a href="http://matthewjamestaylor.com/blog/ultimate-stacked-columns-ems.htm">Stacked <span>Columns</span></a></li>
|
172
|
+
</ul>
|
173
|
+
<p id="layoutdims">Measure columns in: <a href="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-pixels.htm">Pixel widths</a> | <strong>Em widths</strong> | <a href="http://matthewjamestaylor.com/blog/perfect-3-column-blog-style.htm">Percentage widths</a></p>
|
174
|
+
</div>
|
175
|
+
<div class="colmask blogstyle">
|
176
|
+
<div class="colmid">
|
177
|
+
<div class="colleft">
|
178
|
+
<div class="col1wrap">
|
179
|
+
<div class="col1">
|
180
|
+
<!-- Column 1 start -->
|
181
|
+
<h2>Em dimensions of the blog style layout</h2>
|
182
|
+
<img src="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-ems-dimensions.gif" width="350" height="370" alt="Blog style three column layout em dimensions" />
|
183
|
+
<p>In this layout the center and right column widths are in ems 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 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>
|
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/ultimate-3-column-blog-style-div-structure.gif" width="350" height="369" alt="The blog style 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 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.</p>
|
188
|
+
<!-- Column 1 end -->
|
189
|
+
</div>
|
190
|
+
</div>
|
191
|
+
<div class="col2">
|
192
|
+
<% if yield :column_2 %><%= yield :column_2 %><% else %>
|
193
|
+
<!-- Column 2 start -->
|
194
|
+
<h2>No CSS hacks</h2>
|
195
|
+
<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>
|
196
|
+
<h2>SEO friendly 2-1-3 column ordering</h2>
|
197
|
+
<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>
|
198
|
+
<h2>Equal height columns</h2>
|
199
|
+
<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>
|
200
|
+
<h2>No Images</h2>
|
201
|
+
<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>
|
202
|
+
<h2>No JavaScript</h2>
|
203
|
+
<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>
|
204
|
+
<!-- Column 2 end -->
|
205
|
+
<% end %>
|
206
|
+
</div>
|
207
|
+
<div class="col3">
|
208
|
+
<!-- Column 3 start -->
|
209
|
+
<h2>Full cross-browser support</h2>
|
210
|
+
<p>The blog style 3 column liquid Layout has been tested on the following browsers:</p>
|
211
|
+
|
212
|
+
<h3>iPhone & iPod Touch</h3>
|
213
|
+
<ul>
|
214
|
+
<li>Safari</li>
|
215
|
+
</ul>
|
216
|
+
<h3>Mac</h3>
|
217
|
+
<ul>
|
218
|
+
<li>Safari</li>
|
219
|
+
<li>Firefox</li>
|
220
|
+
<li>Opera 9.25</li>
|
221
|
+
<li>Netscape 9.0.0.5 & 7.1</li>
|
222
|
+
</ul>
|
223
|
+
<h3>Windows</h3>
|
224
|
+
<ul>
|
225
|
+
<li>Firefox 1.5 & 2</li>
|
226
|
+
|
227
|
+
<li>Safari</li>
|
228
|
+
<li>Opera 8.1 & 9</li>
|
229
|
+
<li>Explorer 5.5, 6 & 7</li>
|
230
|
+
<li>Netscape 8</li>
|
231
|
+
</ul>
|
232
|
+
<h2>Valid XHTML strict markup</h2>
|
233
|
+
<p>The HTML in this layout validates as XHTML 1.0 strict.</p>
|
234
|
+
<h2>Resizable text compatible</h2>
|
235
|
+
<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>
|
236
|
+
<h2>FREE for anyone to use</h2>
|
237
|
+
<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>
|
238
|
+
<h2>Free traffic for your website</h2>
|
239
|
+
<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>
|
240
|
+
<!-- Column 3 end -->
|
241
|
+
</div>
|
242
|
+
</div>
|
243
|
+
</div>
|
244
|
+
</div>
|
245
|
+
<div id="footer">
|
246
|
+
<p>This page uses the <a href="http://matthewjamestaylor.com/blog/ultimate-3-column-blog-style-ems.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>
|
247
|
+
</div>
|
248
|
+
|
249
|
+
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
|
250
|
+
</script>
|
251
|
+
<script type="text/javascript">
|
252
|
+
_uacct = "UA-1848067-8";
|
253
|
+
urchinTracker();
|
254
|
+
</script>
|
255
|
+
|
256
|
+
</body>
|
257
|
+
</html>
|