File tree Expand file tree Collapse file tree 3 files changed +36
-5
lines changed
Expand file tree Collapse file tree 3 files changed +36
-5
lines changed Original file line number Diff line number Diff line change 99 < script defer src ="quotes.js "> </ script >
1010 </ head >
1111 < body >
12- < p id ="quote "> </ p >
13- < p id ="author "> </ p >
14- < button type ="button " id ="new-quote "> New quote</ button >
12+ < div >
13+ < p id ="quote "> </ p >
14+ < p id ="author "> </ p >
15+ < button type ="button " id ="new-quote "> New quote</ button >
16+ </ div >
1517 </ body >
1618</ html >
Original file line number Diff line number Diff line change @@ -497,8 +497,8 @@ let quoteButton = document.getElementById("new-quote");
497497
498498function displayQuote ( ) {
499499 let randomQuote = pickFromArray ( quotes ) ;
500- quote . textContent = randomQuote . quote ;
501- author . textContent = randomQuote . author ;
500+ quote . textContent = `" ${ randomQuote . quote } "` ;
501+ author . textContent = `- ${ randomQuote . author } ` ;
502502}
503503displayQuote ( ) ;
504504quoteButton . addEventListener ( "click" , displayQuote ) ;
Original file line number Diff line number Diff line change 11/** Write your CSS in here **/
2+ body {
3+ background-color : antiquewhite;
4+ display : flex;
5+ justify-content : center;
6+ align-items : center;
7+ height : 100vh ;
8+ font-family : Arial, Helvetica, sans-serif;
9+ }
10+
11+ div {
12+ background-color : azure;
13+ width : 500px ;
14+ padding : 60px ;
15+ border-radius : 10px ;
16+ box-shadow : 5px 5px 10px black;
17+ }
18+
19+ # quote {
20+ font-size : 24px ;
21+ }
22+
23+ # author {
24+ font-size : 18px ;
25+ }
26+
27+ # new-quote {
28+ padding : 16px 10px ;
29+ border-radius : 10px ;
30+ }
You can’t perform that action at this time.
0 commit comments