Ajax Loader
HTML
<div id="wrap">
1
<div id="wrap">
2
 
3
<header role="banner">
4
    <h1>Hide the sidebar!</h1>
5
    <a href="http://twitter.com/genelocklin" title="follow me for more awesome shit">by @genelocklin</a>
6
</header>   
7
 
8
    <nav role="navigation"></nav>
9
    
10
    <input type="checkbox" id="width_sidebar" role="button">
11
    <label for="width_sidebar"><span>hide the sidebar</span><span>&raquo;</span><span>&laquo;</span></label>    
12
 
13
    <div role="main">    
14
        <article class="post">
15
            <h1 itemprop="headline">Hide the Sidebar!</h1>
16
            <p>Toggle the button to the right, to hide the sidebar.
17
                Father Christmas. Santa Claus. Or as I've always known him: Jeff. I'm the Doctor. </p>
18
            <h2>The Pandorica Opens</h2>
19
            <p>Father Christmas. Santa Claus. Or as I've always known him: Jeff. I'm the Doctor. Well, they call me the Doctor. I don't know why. I call me the Doctor too. I still don't know why. I hate yogurt. It's just stuff with bits in. It's art! A statement on modern society, 'Oh Ain't Modern Society Awful?'! I am the Doctor, and you are the Daleks!</p>
20
            <h3>Planet of the Dead</h3>
21
            <p>Aw, you're all Mr. Grumpy Face today. You've swallowed a planet! The way I see it, every life is a pile of good things and bad things.&hellip;hey.&hellip;the good things don't always soften the bad things; but vice-versa the bad things don't necessarily spoil the good things and make them unimportant. You hate me; you want to kill me! Well, go on! Kill me! KILL ME! Annihilate? No. No violence. I won't stand for it. Not now, not ever, do you understand me?! I'm the Doctor, the Oncoming Storm - and you basically meant beat them in a football match, didn't you? It's art! A statement on modern society, 'Oh Ain't Modern Society Awful?'!</p>
22
            <h4>The Waters of Mars</h4>
23
            <p>The way I see it, every life is a pile of good things and bad things.&hellip;hey.&hellip;the good things don't always soften the bad things; but vice-versa the bad things don't necessarily spoil the good things and make them unimportant. You hit me with a cricket bat. Heh-haa! Super squeaky bum time! Stop talking, brain thinking. Hush. I'm the Doctor, I'm worse than everyone's aunt. *catches himself* And that is not how I'm introducing myself.</p>
24
            <h5>The Stolen Earth</h5>
25
            <p>Heh-haa! Super squeaky bum time! You hate me; you want to kill me! Well, go on! Kill me! KILL ME! You hate me; you want to kill me! Well, go on! Kill me! KILL ME! It's a fez. I wear a fez now. Fezes are cool.</p>
26
            <h6>Amy's Choice</h6>
27
            <p>I'm the Doctor. Well, they call me the Doctor. I don't know why. I call me the Doctor too. I still don't know why. Heh-haa! Super squeaky bum time! Did I mention we have comfy chairs? I'm the Doctor, I'm worse than everyone's aunt. *catches himself* And that is not how I'm introducing myself.</p>
28
        </article><!-- /post -->   
29
    </div><!-- /main -->
30
       
31
    <aside role="complimentary">
32
        <h2><a href="http://twitter.com/genelocklin" title="follow gene locklin">Follow me on Twitter</a></h2>
33
        <p>Father Christmas. Santa Claus. Or as I've always known him: Jeff. I'm the Doctor. Well, they call me the Doctor. I don't know why. I call me the Doctor too. I still don't know why. I hate yogurt. It's just stuff with bits in. It's art! A statement on modern society, 'Oh Ain't Modern Society Awful?'! I am the Doctor, and you are the Daleks!</p>
34
        <p>Aw, you're all Mr. Grumpy Face today. You've swallowed a planet! The way I see it, every life is a pile of good things and bad things.&hellip;hey.&hellip;the good things don't always soften the bad things; but vice-versa the bad things don't necessarily spoil the good things and make them unimportant. You hate me; you want to kill me! Well, go on! Kill me! KILL ME! Annihilate? No. No violence. I won't stand for it. Not now, not ever, do you understand me?! I'm the Doctor, the Oncoming Storm - and you basically meant beat them in a football match, didn't you? It's art! A statement on modern society, 'Oh Ain't Modern Society Awful?'!</p>    
35
    </aside>
36
  
37
</div><!-- /wrap -->
38
 
 
CSS
/* -------------------------------------------------------
1
/* -------------------------------------------------------
2
   ================================================== */
3
 
4
@import url(http://fonts.googleapis.com/css?family=Bitter:400,700);
5
 
6
/* -------------------------------------------------------
7
   ================================================== */
8
 
9
* {
10
    margin: 0;
11
    padding: 0;
12
    border: 0;
13
    -webkit-box-sizing: border-box;
14
    -moz-box-sizing: border-box;
15
    box-sizing: border-box;
16
}
17
 
18
body {
19
    font-family: 'Bitter', sans-serif;
20
    font-weight: normal;
21
    font-size: 100%;
22
    line-height: 1.5em;
23
    color: #4b4b4b;
24
    background: #252525 url(http://cssdeck.com/uploads/media/items/4/439xn4M.png) 0 0 repeat;
25
    text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.5);
26
}
27
 
28
h1, h2, h3, h4, h5, h6 {
29
    font-family: 'Bitter', serif;
30
    font-weight: normal;
31
    color: #121212;
32
}
33
 
34
h1 {
35
    font-size: 1.5em;
36
    line-height: 1em;
37
    margin: 1em 0;
38
}
39
 
40
h2, h3 {
41
    font-size: 1.25em;
42
    line-height: 1.2em;
43
    margin: 1.2em 0;
44
}
45
 
46
h4, h5, h6 {
47
    font-size: 1em;
48
    line-height: 1.5em;
49
    margin: 1.5em 0;
50
}
51
 
52
p {
53
    margin: 0 0 1.5em 0;
54
    color: #727272;
55
    -webkit-hyphens: auto;
56
    -moz-hyphens: auto;
57
    -ms-hyphens: auto;
58
    -o-hyphens: auto;
59
    hyphens: auto;
60
}
61
 
62
a {
63
    text-decoration: none;
64
    color: #fff;
65
    text-shadow: none;
66
}
67
 
68
a:hover { border-bottom: 2px solid }
69
 
70
#wrap {
71
    max-width: 960px;
72
    width: 90%;
73
    margin: 3em auto;
74
    background: #edeff4 url(http://cssdeck.com/uploads/media/items/4/439xn4M.png) 0 0 repeat;
75
    overflow: hidden;
76
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
77
}
78
 
79
[role="banner"] {
80
    width: 100%;
81
    background: #263347 url(http://cssdeck.com/uploads/media/items/4/439xn4M.png) 0 0 repeat;
82
    padding: 3em 2.5%;
83
}
84
 
85
[role="banner"] h1 {
86
    color: #fff;
87
    text-shadow: none;
88
    line-height: 1;
89
    margin: 0;
90
}
91
 
92
[role="banner"] a {
93
    text-decoration: none;
94
    color: #fff;
95
    text-shadow: none;
96
}
97
 
98
[role="banner"] a:hover { border-bottom: 2px solid }
99
 
100
nav {
101
    height: 2em;
102
    width: 100%;
103
    background: #7db067 url(http://cssdeck.com/uploads/media/items/4/439xn4M.png) 0 0 repeat;
104
}
105
 
106
[role="main"] {
107
    width: 60%;
108
    float: left;
109
    z-index: 10;
110
    background: #f6f6f6 url(http://cssdeck.com/uploads/media/items/4/439xn4M.png) 0 0 repeat;
111
    height: 100%;
112
    padding: 0 2.5%;
113
    margin-top: -1.5em;
114
    border-right: 1px solid #e4e4e4;
115
}
116
 
117
[role="main"] h1:first-child { margin: 2em 0 }
118
 
119
[role="complimentary"] {
120
    width: 40%;
121
    float: right;
122
    padding: 0 2.5%;
123
}
124
 
125
[role="complimentary"] p {
126
    font-size: 0.875em;
127
    line-height: 1.714286em;
128
    margin-bottom: 1.714286em;
129
}
130
 
131
[role="complimentary"] h2 { margin: 1.2em 0 2.4em 0 }
132
 
133
[role="complimentary"] h2 a {
134
    color: #263347;
135
    text-decoration: none;
136
}
137
 
138
[role="complimentary"] h2 a:hover { border-bottom: 2px solid #263347 }
139
 
140
input[type=checkbox] {
141
    border: 0;
142
    clip: rect(0 0 0 0);
143
    height: 1px;
144
    width: 1px;
145
    margin: -1px;
146
    overflow: hidden;
147
    padding: 0;
148
    position: absolute;
149
}
150
 
151
[for="width_sidebar"] {
152
    border-right: 1px solid #e4e4e4;
153
    border-bottom: 1px solid #e4e4e4;
154
    display: inline;
155
    border-radius: 0 0 5px 0;
156
    float: left;
157
    margin-left: 59.9%;
158
    position: relative;
159
    top: 0;
160
    width: 5%;
161
    height: auto;
162
    background: #f6f6f6 url(http://cssdeck.com/uploads/media/items/4/439xn4M.png) 0 0 repeat;
163
    text-align: center;
164
    color: #bebebe;
165
    line-height: 1.5em;
166
}
167
 
168
[for="width_sidebar"]:hover ~ [role="main"] { box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1) }
169
 
170
[for="width_sidebar"] span:nth-of-type(1) {
171
    border: 0;
172
    clip: rect(0 0 0 0);
173
    height: 1px;
174
    width: 1px;
175
    margin: -1px;
176
    overflow: hidden;
177
    padding: 0;
178
    position: absolute;
179
}
180
 
181
[for="width_sidebar"] span:nth-of-type(3) {
182
    display: none;
183
    visibility: hidden;
184
}
185
 
186
input[type=checkbox]:checked ~ [role="complimentary"] { width: 100% !important }
187
 
188
input[type=checkbox]:checked ~ [role="main"] {
189
    width: 100%;
190
    box-shadow: none;
191
}
192
 
193
input[type=checkbox]:checked ~ [for="width_sidebar"] {
194
    border: none;
195
    margin: 0;
196
    float: right;
197
}
198
 
199
input[type=checkbox]:checked ~ [for="width_sidebar"] span:nth-of-type(3) {
200
    display: block;
201
    visibility: visible;
202
}
203
 
204
input[type=checkbox]:checked ~ [for="width_sidebar"] span:nth-of-type(2) {
205
    display: none;
206
    visibility: hidden;
207
}
208
 
209
@media screen and (max-width: 804px) { 
210
    [for="width_sidebar"] { margin-left: 59.7% }
211
}
212
 
213
@media screen and (max-width: 550px) { 
214
    html { font-size: 90% }
215
 
216
    [role="complimentary"] {
217
        width: 100%;
218
        background: #edeff4 url(http://cssdeck.com/uploads/media/items/4/439xn4M.png) 0 0 repeat;
219
    }
220
 
221
    [role="main"] {
222
        width: 100%;
223
        margin-top: 0;
224
    }
225
 
226
    [for="width_sidebar"] {
227
        border: 0;
228
        clip: rect(0 0 0 0);
229
        height: 1px;
230
        width: 1px;
231
        margin: -1px;
232
        overflow: hidden;
233
        padding: 0;
234
        position: absolute;
235
    }
236
}
 

CSS Only Toggle

CSSDeck G+