-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcssTest.html
49 lines (48 loc) · 1.69 KB
/
cssTest.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
<!DOCTYPE html>
<html lang="en">
<head>
<style>
div {
/*
initialize standard css values for div background-color, color, border-width, border-color, border-style, padding, margin
*/
height: 200px;
width: 200px;
background-color: lightblue;
color: black;
border-width: 1px;
border-color: black;
border-style: solid;
padding: 10px;
margin: 10px;
box-sizing: border-box; /*content-box;*/
}
text {
display: inline-block;
}
</style>
</head>
<body>
<br><br><br><br><br><br><br><br><br>
<div>
<text>Yello,</text>
<sausage>Wurst.</sausage>
<text>greetings!</text>
</div>
<!-- 10 empty lines -->
<br><br><br><br><br><br><br><br><br>
<!-- add forms with buttons for css properties border-width, padding and margin to increase and decrease -->
<form>
<button type="button" onclick="document.querySelector('div').style.borderWidth = '5px'">Increase Border Width</button>
<button type="button" onclick="document.querySelector('div').style.borderWidth = '1px'">Decrease Border Width</button>
</form>
<form>
<button type="button" onclick="document.querySelector('div').style.padding = '20px'">Increase Padding</button>
<button type="button" onclick="document.querySelector('div').style.padding = '10px'">Decrease Padding</button>
</form>
<form>
<button type="button" onclick="document.querySelector('div').style.margin = '20px'">Increase Margin</button>
<button type="button" onclick="document.querySelector('div').style.margin = '10px'">Decrease Margin</button>
</form>
</body>
</html