-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
89 lines (77 loc) · 1.96 KB
/
style.css
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
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f4f4f4;
font-family: 'Arial', sans-serif;
}
.container {
display: flex;
flex-direction: column;
align-items: center; /* Center align the title and calculator */
}
.title {
font-size: 24px; /* Adjust title size */
margin-bottom: 20px; /* Space between title and calculator */
color: #333; /* Color of the title */
}
.calculator {
border-radius: 5px;
padding: 20px;
background-color: #ffffff;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
width: 400px; /* Adjusted width for more elements */
height: 600px; /* Increased height */
}
#result {
width: 100%;
height: 60px;
text-align: right;
margin-bottom: 20px;
font-size: 32px;
border: 2px solid #007bff;
border-radius: 5px;
padding: 10px;
background-color: #f9f9f9;
}
.buttons {
display: flex;
flex-direction: row; /* Horizontal layout */
justify-content: space-between; /* Space between numbers and operators */
height: calc(100% - 80px); /* Remaining height */
}
.numbers {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px; /* Space between buttons */
flex: 3; /* Numbers take more space */
}
.operators {
display: flex;
flex-direction: column; /* Vertical layout for operators */
gap: 10px; /* Space between buttons */
flex: 1; /* Operators take less space */
}
button {
padding: 20px;
font-size: 22px;
border: none;
border-radius: 5px;
background-color: #007bff;
color: white;
cursor: pointer;
transition: background-color 0.3s, transform 0.1s;
}
button:hover {
background-color: #0056b3;
}
button:active {
transform: scale(0.95);
}
button.operator {
background-color: #28a745;
}
button.operator:hover {
background-color: #218838;
}