-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplay Property in CSS.html
More file actions
118 lines (108 loc) · 2.85 KB
/
Display Property in CSS.html
File metadata and controls
118 lines (108 loc) · 2.85 KB
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
/* Display Property */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="/CSS/style.css" />
<style>
/*display property 4 type hoy inline, block, inline-block, none*/
/*
display property inline set korle,
oi element ta only tar jototuk jayga dorkar tototuk jayga e nibe,
no margin no padding
*/
/*
block set korle ekdom full space nibe,
tar width shoho
*/
/*
display inline set kora hole element'r margin and padding set kora jay na,
but jodi display inline-block set kora hoy tahole tahole element'r margin and padding set kora jabe
*/
/*
display property none set korle oi element ta fully gayab hoya jabe
*/
/*Inline display property*/
#div1 {
/*
div hocche ekta block space element
eta te display inline set kore dile,
it will take only that space jeta oi element ta ney
*/
background-color: lightblue;
display: inline;
}
/*Block display property*/
#button2 {
background-color: lightpink;
display: block;
/*
ekhane button ta inline element
kintu etake block element e set kora hoise
page'r inspect e gele etake block element hishabe pawa jabe
*/
}
/*Inline-block display property*/
#div2 {
background-color: blue;
height: 100px;
width: 100px;
display: inline;
}
#div3 {
background-color: red;
height: 100px;
width: 100px;
display: inline;
}
#div4 {
background-color: green;
height: 100px;
width: 100px;
display: inline;
}
/*
ekhane box2,3,4 e inline display deway set kora height width kisui kaj kore nai,
even margin padding egula add korleo ta o kaj korto na
*/
#div5 {
background-color: blue;
height: 100px;
width: 100px;
margin: 100px;
display: inline-block;
}
#div6 {
background-color: red;
height: 100px;
width: 100px;
margin: 100px;
display: inline-block;
}
#div7 {
background-color: green;
height: 100px;
width: 100px;
margin: 100px;
display: inline-block;
}
</style>
</head>
<body>
<div id="div1">This is div</div>
<button>Click Me!(1)</button>
<button id="button2">Click Me!(2)</button>
<div>
<div id="div2">Box2</div>
<div id="div3">Box3</div>
<div id="div4">Box4</div>
</div>
<div>
<div id="div5">Box5</div>
<div id="div6">Box6</div>
<div id="div7">Box7</div>
</div>
</body>
</html>