-
Notifications
You must be signed in to change notification settings - Fork 1
/
css-tags.html
247 lines (213 loc) · 8.46 KB
/
css-tags.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
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<html>
<head>
<title>Mindchamp's CodeRealm</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<!--
<header style="display: flex;
align-content: flex-start;
flex-wrap: wrap;
flex-direction: row;
justify-content: center;
}">
<h1 style="margin-top:35px;margin-left:40px;">MindChamp's CodeRealm - A website created by MindChamp students</h1>
<div class="links"><a href="https://learnwithmindchamp.github.io/mindchamps-coderealm/html-tags.html" class="linkh">HTML</a>
<a href="https://learnwithmindchamp.github.io/mindchamps-coderealm/css-tags.html" class="linkh">CSS</a>
<a href="https://learnwithmindchamp.github.io/mindchamps-coderealm/credits.html" class="linkh">CREDITS</a>
</div></header> -->
<div class="search-container">
<input type="text" id="searchInput" class="search-input" placeholder="Search...">
</td>
<td class="c5"> <button onclick="searchSections()" class="search-button">Search for a property by name</button> </td>
<td class="c5"><div class="dropdown">
<button onclick="toggleDropdown()" class="search-button">Go to Section</button>
<div id="sectionDropdown" class="dropdown-content">
<a href="#color">color</a>
<a href="#background-color">background-color</a>
<a href="#font-family">font-family</a>
<a href="#font-size">font-size</a>
<a href="#font-weight">font-weight</a>
<a href="#font-style">font-style</a>
<a href="#text-decoration">text-decoration</a>
<a href="#text-align">text-align</a>
<a href="#margins-and-paddings">margin & padding</a>
<a href="#border">border</a>
<a href="#width-and-height">width & height</a>
<a href="#display">display</a>
<a href="#position">position</a>
<a href="#float">float</a>
<a href="#background-image">background-image</a>
<a href="#background-repeat">background-repeat</a>
<a href="#background-size">background-size</a>
<a href="#visibility">visibility</a>
<a href="#opacity">opacity</a>
<a href="#transform">transform</a>
<a href="#transform-origin">transform-origin</a>
<a href="#box-sizing">box-sizing</a>
<a href="#overflow">overflow</a>
<a href="#list-style-type">list-style-type</a>
<a href="#list-style-image">list-style-image</a>
</div>
</div>
</div>
</div>
</td>
</tr>
<main style="margin-left:20px;">
<section id="color">
<h2>color:</h2>
<p>Sets the text color.</p>
<p><b>Values: </b> Named colors (like red, blue), hexadecimal color codes, RGB values, etc.</p>
</section>
<section id="background-color">
<h2>background-color:</h2>
<p>Sets the background color of an element.</p>
<p><b>Values: </b> Named colors (e.g. 'red', 'blue'), hexadecimal color codes, RGB values, etc.</p>
</section>
<section id="font-family">
<h2>font-family:</h2>
<p>defines the font for the text.</p>
<p><b>Values: </b>'Font names, generic font families (e.g., 'serif', 'sans-serif').</p>
</section>
<section id="font-size">
<h2>font-size:</h2>
<p>Sets the text size.</p>
<p><b>Values: </b>Pixels (px), ems (em), percentages (%), etc.</p>
</section>
<section id="font-weight">
<h2>font-weight:</h2>
<p>Sets the boldness of the text.</p>
<p><b>Values: </b>' normal', 'bold', numeric values (e.g. '700').</p>
</section>
<section id="font-style">
<h2>font-style:</h2>
<p>Sets the style of the text.</p>
<p><b>Values: </b>'normal', 'italic', 'oblique'</p>
</section>
<section id="text-decoration">
<h2>text-decoration: </h2>
<p>Adds decorations to text.</p>
<p><b>Values: </b>'none', 'underline', 'overline', 'line-through'.</p>
</section>
<section id="text-align">
<h2>text-align: </h2>
<p>Specifies text alignment.</p>
<p><b>Values: </b>'left', 'right','center','justify'.</p>
</section>
<section id="margins-and-paddings">
<h2>margins and padding: </h2>
<p><b>margin:</b>Sets margins around an element <br> <b>padding</b>: Sets padding within an element</p>
<p><b>Values: </b>'Length values (px, em)', 'percentages (%)', 'auto'</p>
</section>
<section id="border">
<h2>border: </h2>
<p>Sets all border properties</p>
<p><b>Values: </b>'border-width', 'border-style', 'border-color'</p>
</section>
<section id="width-and-height">
<h2>width and height: </h2>
<p><b>width:</b> Sets the width of an element<br> <b>height:</b> Sets the height of an element</p>
<p><b>Values: </b>'Pixels(px), 'percentages (%)', 'auto'</p>
</section>
<section id="display">
<h2>display: </h2>
<p>Specifies how an element is displayed.</p>
<p><b>Values: </b>'block', 'inline', 'inline-block', 'none'</p>
</section>
<section id="position">
<h2>position: </h2>
<p>Specifies the positioning method.</p>
<p><b>Values: </b>'static', 'relative', 'absolute', 'fixed'</p>
</section>
<section id="float">
<h2>float: </h2>
<p>Specifies how an element should float.</p>
<p><b>Values: </b>'left', 'right', 'none'</p>
</section>
<section id="background-image">
<h2>background-image: </h2>
<p>Sets a background image.</p>
<p><b>Values: </b>'URL'</p>
</section>
<section id="background-repeat">
<h2>background-repeat: </h2>
<p>Defines how background images are repeated.</p>
<p><b>Values: </b>'repeat', 'no-repeat', 'repeat-y', 'repeat-x'</p>
</section>
<section id="background-size">
<h2>background-size: </h2>
<p>Specifies the size of background images..</p>
<p><b>Values: </b>px</p>
</section>
<section id="visibility">
<h2>visibility: </h2>
<p>Controls the visibility of an element.</p>
<p><b>Values: </b>'visible', 'hidden'</p>
</section>
<section id="opacity">
<h2>opacity: </h2>
<p>Sets the opacity of an element:</p>
<p><b>Values: </b>Numeric values between 0 (transparent) and 1 (opaque)</p>
</section>
<section id="transform">
<h2>transform: </h2>
<p>Applies 2D and 3D tranformations to element.</p>
<p><b>Values: </b>'rotate(deg)', 'skewX(deg)', 'skewY(deg)'</p>
</section>
<section id="transform-origin">
<h2>transform-origin: </h2>
<p>Sets the origin point for transformations.</p>
<p><b>Values: </b>'x-axis', 'y-axis'</p>
</section>
<section id="box-sizing">
<h2>box-sizing: </h2>
<p>Specifies how an element's is box value is calculated.</p>
<p><b>Values: </b>'content-box', 'border-box'</p>
</section>
<section id="overflow">
<h2>overflow: </h2>
<p>Defines how content that overflows an element's box is handled.</p>
<p><b>Values: </b>'visible', 'hidden', 'scroll', 'auto'</p>
</section>
<section id="list-style-type">
<h2>list-style-type: </h2>
<p>Sets the list item marker type.</p>
<p><b>Values: </b>'circle', 'square', 'upper-roman', 'lower-alpha'</p>
</section>
<section id="list-style-image">
<h2>list-style-image: </h2>
<p>Sets an image as the list item marker.</p>
<p><b>Values: </b>'URL'</p>
</section>
<script>
function searchSections() {
const searchTerm = document.getElementById("searchInput").value.toLowerCase();
const sections = document.querySelectorAll("section");
for (const section of sections) {
const sectionText = section.textContent.toLowerCase();
if (sectionText.includes(searchTerm)) {
section.scrollIntoView({ behavior: "smooth" });
break;
}
}
}
function toggleDropdown() {
const dropdownContent = document.getElementById("sectionDropdown");
dropdownContent.style.display = dropdownContent.style.display === "block" ? "none" : "block";
}
</script></main>
<script>
function toggleDropdown() {
const dropdownContent = document.getElementById("sectionDropdown");
dropdownContent.style.display = dropdownContent.style.display === "block" ? "none" : "block";
}
</script>
<footer>
<div class="footer-content">
<p>© 2023 MindChamp's CodeRealm. All rights reserved.</p>
<p>Contact Us: <a href="mailto:[email protected]">[email protected]</a></p>
</div>
</footer>
</body>
</html>