-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmargin.html
More file actions
187 lines (159 loc) · 5.26 KB
/
Copy pathmargin.html
File metadata and controls
187 lines (159 loc) · 5.26 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html>
<html>
<head>
<title>Box Model Test Page</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color: #f5f5f5;
}
.test-container {
margin-bottom: 30px;
padding: 10px;
background-color: white;
border: 1px dashed #ccc;
}
.test-title {
font-weight: bold;
margin-bottom: 10px;
color: #333;
}
.block {
background-color: rgba(100, 150, 200, 0.5);
color: white;
text-align: center;
padding: 5px;
margin: 5px;
border: 1px solid #333;
}
/* Margin Tests */
.margin-test-1 {
margin: 20px;
}
.margin-test-2 {
margin: 10px 30px;
}
.margin-test-3 {
margin: 5px 10px 15px 20px;
}
.margin-test-4 {
margin-top: 30px;
margin-bottom: 10px;
}
/* Padding Tests */
.padding-test-1 {
padding: 20px;
}
.padding-test-2 {
padding: 10px 30px;
}
.padding-test-3 {
padding: 5px 10px 15px 20px;
}
.padding-test-4 {
padding-left: 40px;
}
/* Border Tests */
.border-test-1 {
border: 5px solid red;
}
.border-test-2 {
border-width: 10px 5px;
border-style: dashed;
border-color: green;
}
.border-test-3 {
border-top: 3px dotted blue;
border-right: 6px double orange;
border-bottom: 9px groove purple;
border-left: 12px ridge teal;
}
/* Mixed Tests */
.mixed-test-1 {
margin: 15px;
padding: 10px;
border: 2px solid black;
}
.mixed-test-2 {
margin: 5px 20px;
padding: 15px 5px;
border: 8px double #333;
}
/* Nested Elements */
.nested-container {
background-color: #ffeb3b;
padding: 20px;
margin: 10px;
}
.nested-child {
background-color: #4caf50;
margin: 15px;
padding: 10px;
border: 3px solid #333;
}
/* Edge Cases */
.edge-case-1 {
margin: 0;
padding: 0;
border: none;
}
.edge-case-2 {
margin: -10px;
padding: 20px;
}
/* Percentage Values */
.percentage-test {
margin: 5%;
padding: 2%;
width: 50%;
}
</style>
</head>
<body>
<h1>Browser Box Model Test Page</h1>
<div class="test-container">
<div class="test-title">Basic Margin Tests</div>
<div class="block margin-test-1">margin: 20px (all sides)</div>
<div class="block margin-test-2">margin: 10px 30px (top/bottom, left/right)</div>
<div class="block margin-test-3">margin: 5px 10px 15px 20px (top, right, bottom, left)</div>
<div class="block margin-test-4">margin-top: 30px, margin-bottom: 10px</div>
</div>
<div class="test-container">
<div class="test-title">Basic Padding Tests</div>
<div class="block padding-test-1">padding: 20px (all sides)</div>
<div class="block padding-test-2">padding: 10px 30px (top/bottom, left/right)</div>
<div class="block padding-test-3">padding: 5px 10px 15px 20px (top, right, bottom, left)</div>
<div class="block padding-test-4">padding-left: 40px</div>
</div>
<div class="test-container">
<div class="test-title">Border Tests</div>
<div class="block border-test-1">5px solid red border</div>
<div class="block border-test-2">10px top/bottom, 5px left/right dashed green border</div>
<div class="block border-test-3">Mixed borders (top, right, bottom, left all different)</div>
</div>
<div class="test-container">
<div class="test-title">Mixed Margin/Padding/Border</div>
<div class="block mixed-test-1">margin:15px, padding:10px, border:2px</div>
<div class="block mixed-test-2">margin:5px 20px, padding:15px 5px, border:8px double</div>
</div>
<div class="test-container">
<div class="test-title">Nested Elements</div>
<div class="nested-container">
Parent with padding:20px, margin:10px
<div class="nested-child">
Child with margin:15px, padding:10px, border:3px
</div>
</div>
</div>
<div class="test-container">
<div class="test-title">Edge Cases</div>
<div class="block edge-case-1">No margin, no padding, no border</div>
<div class="block edge-case-2">Negative margin (-10px) with padding</div>
</div>
<div class="test-container">
<div class="test-title">Percentage Values</div>
<div class="block percentage-test">margin:5%, padding:2%, width:50%</div>
</div>
</body>
</html>