-
Notifications
You must be signed in to change notification settings - Fork 0
/
twoColumn.html
50 lines (44 loc) · 1.1 KB
/
twoColumn.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<style>
body {
background-color: #f3f3f3
}
.container {
margin: 0 auto;
width: 1280px;
/* Or for an elastic content column. width:100%; max-width:1280px;*/
padding: 0;
box-sizing: border-box;
}
.banner {
height: 150px;
/*Dummy height for demo*/
}
.banner,
.sidebar,
.content {
border: solid 1px #d1d7d9;
box-shadow: 0px 0.5px 2px 0px rgba(0, 0, 0, 0.2);
background-color: #FFF;
padding: 5px;
margin-bottom: 20px;
}
.sidebar,
.content {}
.sidebar {
float: right;
width: 300px;
}
.content {
margin-right: 330px;
/*sidebar width (300px) + box margin (20px) + content padding (2x5px)*/
}
</style>
<div class='container'>
<div class='banner'>banner</div>
<div class='sidebar'>Sidebar</div>
<div class='content'>Content</div>
</div>
<div class='container'>
<div class='sidebar'>Sidebar</div>
<div class='content'>Content</div>
</div>