forked from viztech/Assignment-2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
47 lines (40 loc) · 844 Bytes
/
style.css
File metadata and controls
47 lines (40 loc) · 844 Bytes
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
html,body,h1,h2,h3,h4,p,div,a,ul,li,span{
margin:0;
padding:0;
}
html,body{
height:100%; /*let body have the browser's height */
}
.box2{
width:33.33%;
float:left;
}
.parent{
width:100%;
position:absolute;/**/
top:50px;/*give the space to red part*/
bottom:50px;/*give the space to purple part*/
}
#red{
background:red;
height:50px;
}
#yellow{
background:yellow;
height:100%;
}
#green{
background:green;
height:100%;
}
#blue{
background:blue;
height:100%;
}
#purple{
background:purple;
height:50px;
width:100%;/*everytime position is relative, heightand width have to be setted,or the default value of height and width are 0;*/
position:absolute;/*the parent part of this absolute part has to be relative*/
bottom:0px;/*set the position of purple*/
}