Skip to content

Commit 192bcce

Browse files
made some css style and made the page to display a quote when opening the page or refreshing it.
1 parent d32519b commit 192bcce

2 files changed

Lines changed: 38 additions & 2 deletions

File tree

‎Sprint-3/quote-generator/quotes.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function displayQuote() {
1414
quote.textContent = randomQuote.quote;
1515
author.textContent = randomQuote.author;
1616
}
17-
17+
window.onload = displayQuote;
1818
// DO NOT EDIT BELOW HERE
1919

2020
// pickFromArray is a function which will return one item, at

‎Sprint-3/quote-generator/style.css‎

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,41 @@ body{
55
margin:0;
66
display: flex;
77
padding: 0 1rem;
8-
background-color: #dd7a7a
8+
background-color: #e2c8c8
99
}
10+
11+
* {
12+
box-sizing: border-box;
13+
}
14+
main.quote-box {
15+
max-width : 600px;
16+
padding :2rem;
17+
text-align : center;
18+
}
19+
20+
#quote {
21+
font-size : 1.5rem;
22+
font-style : italic;
23+
line-height: 1.4;
24+
margin-bottom : 1rem;
25+
}
26+
#author {
27+
font-size: 1rem;
28+
font-weight: 600;
29+
color: #272ad3;
30+
margin-bottom : 2rem;
31+
}
32+
#new-quote {
33+
padding: 0.6rem 1.4rem;
34+
font-size: 1rem;
35+
border: none;
36+
border-radius: 6px;
37+
background-color: #2b2b2b;
38+
color: #fff;
39+
cursor: pointer;
40+
transition: background-color 0.15s ease;
41+
}
42+
43+
#new-quote:hover {
44+
background-color: #444;
45+
}

0 commit comments

Comments
 (0)