Skip to content

Commit 942eaa2

Browse files
I wrote a CSS file for the html file.
1 parent ca4da9b commit 942eaa2

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

Sprint-3/quote-generator/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<link rel="stylesheet" href="style.css">
99
</head>
1010
<body>
11+
<div class="container">
1112
<h1>Quote Generator</h1>
1213
<p id="quote"></p>
1314
<p id="author"></p>

Sprint-3/quote-generator/style.css

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
* {
2+
padding: 0;
3+
margin: 0;
4+
box-sizing: border-box;
5+
}
6+
body {
7+
background-color: orange;
8+
display: flex;
9+
justify-content: center; /* horizontal centering */
10+
align-items: flex-start; /* vertical centering */
11+
height: 100vh; /* full viewport height */
12+
font-family: Georgia, 'Times New Roman', Times, serif;
13+
}
14+
15+
.container {
16+
background-color: white;
17+
width: 70%;
18+
max-width: 650px;
19+
padding: 60px 80px;
20+
border-radius: 8px;
21+
text-align: center; /* centers text inside */
22+
margin:20% 20%;
23+
display: block;}
24+
25+
#quote {
26+
font-size: 28px;
27+
color: #f59e0b;
28+
line-height: 1.5;
29+
position : relative;
30+
margin-bottom: 30px;
31+
32+
}
33+
#quote::before {
34+
content: "“";
35+
font-size: 80px;
36+
position: absolute;
37+
left: -40px;
38+
top: -20px;
39+
color: #f59e0b;
40+
}
41+
#author {
42+
display : block;
43+
text-align: right;
44+
font-size: 16px;
45+
color:#f59e0b;
46+
margin-bottom: 20px;
47+
}
48+
#author::before {
49+
content: "~ ";
50+
font-size: 20px;
51+
color: #f59e0b;
52+
}
53+
#new-quote {
54+
align-items: right;
55+
text-align: right;
56+
background-color: #f59e0b;
57+
color: white;
58+
border: none;
59+
padding: 10px 20px;
60+
cursor: pointer;
61+
font-size: 14px;
62+
border-radius: 2px;
63+
display: block;
64+
}
65+
#new-quote :hover {
66+
opacity: 0.9;
67+
}

0 commit comments

Comments
 (0)