Repository navigation
Expand file tree
/
Copy pathCSS.html
More file actions
339 lines (323 loc) · 15.4 KB
/
Copy pathCSS.html
File metadata and controls
339 lines (323 loc) · 15.4 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
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<!DOCTYPE html>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-121942481-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-121942481-1');
</script>
<title>CSS</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
</head>
<link rel="stylesheet" href="Styles/style.css" type="">
<!--
<body style="background-image:url('images/banner-home.fc70d7f4.jpg')">
-->
<body class="body">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="index.html">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="getting_started.html">Getting Started</a>
</li>
<li class="nav-item">
<a class="nav-link" href="HTML.html">HTML</a>
</li>
<li class="nav-item">
<a class="nav-link" href="CSS.html">CSS</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Version_Control.html">Version Control</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Bootstrap.html">Bootstrap</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Javascript.html">Javascript</a>
</li>
<li class="nav-item">
<a class="nav-link" href="jQuery.html">jQuery</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Analytics.html">Analytics</a>
</li>
</ul>
</div>
</nav>
<!-- end of navigation -->
<div class='jumbotron'>
<div class='container'>
<div class='row'>
<div class='col-sm-1'>
<br>
</div>
<div class='col-sm-2'>
<a href="https://techreturners.com/">
<img src="images/TR_Logo.png" ; alt="Tech Returners Logo" style="width:182px; height:27px">
<p class='whitetext1'>Empowering into Tech</p>
</a>
</div>
<div class='col-sm-9'>
<br>
</div>
<div class='col-sm-12'>
<h1 class='heading1'>Tech Returners</h1>
</div>
<div class='col-sm-12'>
<h2 class='heading2'>CSS - Cascading Style Sheets</h2>
</div>
<div class='col-sm-12'>
<br>
</div>
<div class='col-sm-1'>
<br>
</div>
<div class='col-sm-5'>
<div class='picture'>
<a href="HTML.html">
<img src="images/banner-home.fc70d7f4.jpg" alt="TR Classroom image" style="width:242px; height:146px" ;>
<div class="centered">
<h1>Back</h1>
</div>
</a>
</div>
</div>
<div class='col-sm-6'>
<div class='picture'>
<a href="Version_Control.html">
<img src="images/banner-home.fc70d7f4.jpg" alt="TR Classroom image" style="width:242px; height:146px" ;>
<div class="centered">
<h1>Next</h1>
</div>
</a>
</div>
</div>
<div class='col-sm-12'>
<br>
</div>
<div class='col-sm-12'>
<h2 class='heading2'>WHAT IS CSS?</h2>
</div>
<div class='col-sm-12'>
<h3>
<ul>
<li>CSS (Cascading Style Sheets) was created by the World Wide Web Consortium (W3C) to solve the
problem of formatting and styling a document.</li>
<li>CSS is used to define styles for your web pages, including the design, layout and variations
in display for different devices and screen sizes. </li>
<li>This allows HTML to do its job - defining the content of a document.</li>
<li>Examples of CSS designs…</li>
<ul>
<li>
<a href="https://pattle.github.io/simpsons-in-css/" class='whitetext2'>
https://pattle.github.io/simpsons-in-css/</a>
</li>
<li>
<a href="http://www.csszengarden.com/" class='whitetext2'>
http://www.csszengarden.com/</a>
</li>
</ul>
</ul>
</h3>
</div>
<div class='col-sm-12'>
<h2 class='heading2'>LINKING YOUR CSS AND HTML CODE</h2>
</div>
<div class='col-sm-12'>
<h3>
<ul>
<li>Put the css inline in the html</li>
<li>Put the css in a <style></style> section in the <head></li>
<li>Link to a separate css file in the <head></li>
<li>With an external stylesheet file, you can change the look of an entire website by changing just
one file!
</li>
<li>Demo - linking css file</li>
<li>By separating these CSS rules into their own file you:</li>
<ol>
<li>Reduce repetition in your code</li>
<li>Reduce the amount of information that has to be sent to the browser for each page
<br>If the CSS file applies to the whole site, it only needs to be sent to the visitor once.</li>
</ol>
</ul>
</h3>
</div>
<div class='col-sm-12'>
<h3>
<ul>
<li>Task 1</li>
<ul>
<li>Create a style.css file and create a link to it in your index.html</li>
<li>Write some CSS in the file to check it is linked</li>
</ul>
</ul>
</h3>
</div>
<div class='col-sm-12'>
<h2 class='heading2'>RULE SET</h2>
</div>
<div class='col-sm-12' style="text-align:center">
<h3>
<img src="images/selector.gif" alt="Selector gif" style="width:569px; height:119px" ;>
</h3>
</div>
<div class='col-sm-12'>
<h3 style="text-align:center">Read more about the syntax use to set CSS rules here:
<a href="https://www.w3schools.com/css/css_syntax.asp" class='whitetext2'>
<br> https://www.w3schools.com/css/css_syntax.asp
</a>
</h3>
</div>
<div class='col-sm-12'>
<h2 class='heading2'>MORE ABOUT THE HTML <LINK> TAG</h2>
</div>
<div class='col-sm-12'>
<h3>
<ul>
<li>Absolute links - external links include the complete url to the resource you’re linking to.
<br>Absolute links start with either http:// or https://.</li>
<li>Document-relative links - contain the path to the resource relative to the file where the link
is written. Document-relative links don’t begin with /:</li>
<li>Add an image using both styles of linking</li>
</ul>
</h3>
</div>
<div class='col-sm-12'>
<h2 class='heading2'>ADDING STYLE VIA AN EXTERNAL STYLESHEET
</h2>
</div>
<div class='col-sm-12'>
<h3 style="text-align:center">
<a href="https://codepen.io/LauraClos/pen/vWRNmQ?editors=1100#0" class='whitetext2'>
https://codepen.io/LauraClos/pen/vWRNmQ?editors=1100#0
</a>
</h3>
</div>
<div class='col-sm-12'>
<h2 class='heading2'>ID’S AND CLASS SELECTORS
</h2>
</div>
<div class='col-sm-12'>
<h3>
<code class='yellowtext2'>
<h2 id="products_title">Our scrumptious puddings</h2>
<br><ul id="products_list">
<br> <li class="product_item">Black Forest Gateaux</li>
<br> <li class="product_item">Raspberry
<br> <li class="product_item">Lemon Swirl Cheesecake</li>
<br> <li class="product_item">Sticky Toffee Pudding</li>
<br> <li class="product_item">Death-by-Chocolate Cake</li>
<br></ul>
</code>
</h3>
</div>
<div class='col-sm-12'>
<h3>Both
<b>ID</b> and
<b>Class</b> are used to add some information to the HTML tags.
<br>The difference is that
<b>ID</b> should specify a
<i>
<b>unique</b>
</i> element on the page,
<br>whereas multiple elements can
<i>
<b>share</b>
</i> the same
<b>class.</b>
<br>This is useful when you have loads of code to sift through
</h3>
</div>
<div class='col-sm-12'>
<h2 class='heading2'><DIVS> AND <SPANS></h2>
</div>
<div class='col-sm-12'>
<h3>
<ul>
<li><div> is a block element</li>
<li>A block-level element always starts on a new line and takes up the full width available (stretches
out to the left and right as far as it can).</li>
<li><span> is an inline element</li>
<li>An inline element does not start on a new line and only takes up as much width as necessary.</li>
</ul>
</h3>
</div>
<div class='col-sm-12'>
<h2 class='heading2'>CSS Exercises</h2>
</div>
<div class='col-sm-12'>
<h3>
<a href="https://www.w3schools.com/css/exercise.asp?filename=exercise_syntax1" class='whitetext2'>
https://www.w3schools.com/css/exercise.asp?filename=exercise_syntax1
</a>
</h3>
</div>
<div class='col-sm-12'>
<h2 class='heading2'>CSS Online Quiz</h2>
</div>
<div class='col-sm-12'>
<h3>
<a href="https://www.w3schools.com/quiztest/quiztest.asp?qtest=CSS" class='whitetext2'>
https://www.w3schools.com/quiztest/quiztest.asp?qtest=CSS
</a>
</h3>
</div>
<div class='col-sm-12'>
<h2 class='heading2'> Version Control is next...
<br> Click the link Below</h2>
</div>
<div class='col-sm-12'>
<br>
</div>
<div class='col-sm-4'>
<br>
</div>
<div class='col-sm-4'>
<div class='picture'>
<a href="Version_Control.html">
<img src="images/banner-home.fc70d7f4.jpg" alt="TR Classroom image" style="width:242px; height:146px" ;>
<div class="centered">
<h1>Version Control</h1>
</div>
</a>
</div>
</div>
<div class='col-sm-4'>
<br>
</div>
<div class='col-sm-12'>
<br>
</div>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="main.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
</body>
<!-- © CookieMonster | <a href="https://antony-cooke.github.io/ChesterBL/</a> -->
</html>