Skip to content

Commit a5c0253

Browse files
committed
implement/layout & styles
1 parent dd44797 commit a5c0253

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed

index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>JavaScript Basics</title>
8+
<link rel="stylesheet" href="styles.css">
9+
</head>
10+
11+
<body>
12+
<header>
13+
<h1>JavaScript Basics</h1>
14+
</header>
15+
<main>
16+
<section class="section">
17+
<div class="smile-content">
18+
<button id="smile-button">Touch me</button>
19+
<h3 id="smile"></h3>
20+
</div>
21+
</section>
22+
</main>
23+
</body>
24+
25+
</html>

styles.css

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
}
6+
7+
html,
8+
body {
9+
height: 100%;
10+
font-family: Arial, sans-serif;
11+
}
12+
13+
body {
14+
display: flex;
15+
flex-direction: column;
16+
font-size: 16px;
17+
}
18+
19+
header {
20+
background-color: darksalmon;
21+
border-bottom: 1px solid gray;
22+
padding: 1.5rem;
23+
text-align: center;
24+
}
25+
26+
header h1 {
27+
color: brown;
28+
margin: 0;
29+
}
30+
31+
main {
32+
flex: 1;
33+
display: flex;
34+
flex-direction: column;
35+
min-height: 0;
36+
background-color: lavender;
37+
}
38+
39+
section {
40+
display: flex;
41+
padding: 1.5rem;
42+
background-color: #f9f9f9;
43+
overflow-y: auto;
44+
}
45+
46+
.section {
47+
margin: 24px auto;
48+
max-width: 400px;
49+
}
50+
51+
.smile-content {
52+
text-align: center;
53+
}
54+
55+
button {
56+
background-color: blueviolet;
57+
color: bisque;
58+
border: none;
59+
padding: 0.7rem 1.5rem;
60+
border-radius: 5px;
61+
font-size: 1rem;
62+
cursor: pointer;
63+
margin: 1rem;
64+
}

0 commit comments

Comments
 (0)