-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpractical-10.css
138 lines (134 loc) · 2.3 KB
/
practical-10.css
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/* universal tag */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* for header section */
#header {
position: fixed;
width: 100%;
height: 70px;
background-color: #00416D;
display: flex;
justify-content: center;
align-items: center;
}
#header img {
height: 60px;
margin-right: 20px;
}
#header h1 {
color: white;
}
/* for content section */
#content img {
width: 60%;
height: 500px;
margin-top: 80px;
margin-left: 20%;
margin-bottom: 5px;
border-radius: 20px;
}
#content p {
margin: 10px;
text-align: justify;
font-family: cursive;
}
/* for sidebar section */
#sidebar {
position: fixed;
background-color: #00416D;
height: 100vh;
/* for making click effect */
left: -100%;
width: 25%;
}
#sidebar ul {
margin-top: 70px;
list-style: none;
width: 250px;
}
#sidebar ul li {
padding: 20px;
font-size: 130%;
}
#sidebar ul li a {
color: white;
text-decoration: none;
}
#sidebar ul li a i {
margin-right: 10px;
}
#sidebar hr {
height: 3px;
background-color: wheat;
margin-top: 200px;
opacity: 0.2;
}
#sidebar .one {
width: 40px;
height: 1px;
margin-top: 0px;
}
#sidebar .last {
font-size: 140%;
color: white;
margin: 20px;
margin-top: 10px;
}
#sidebar ul li:hover {
margin-left: 10px;
}
/* for making sliding sidebar */
#check {
position: absolute;
/* for making it not visible */
visibility: hidden;
z-index: -10;
}
.show-btn, .hide-btn {
font-size: 30px;
line-height: 70px;
color: white;
margin-left: 20px;
position: fixed;
z-index: 10;
}
/* making hide button invisible before click */
.hide-btn {
display: none;
}
#check:checked ~ #sidebar {
/* for sliding effect of sidebar */
left: 0;
transition: 0.5s;
}
#check:checked ~ .hide-btn {
display: block;
/* to display hide button */
z-index: 10;
}
#check:checked ~ .show-btn {
display: none;
}
/* for sliding content with sidebar */
#check:checked ~ #content {
width: 75%;
float: right;
}
/* for responsive sidebar */
@media (max-width: 750px) {
#sidebar {
width: 100%;
}
#sidebar ul {
margin-left: 40%;
}
#sidebar .one {
display: none;
}
#header h1 {
display: none;
}
}