From cdb0c90aeed95e8388b8850e4ff0404d54d44ba2 Mon Sep 17 00:00:00 2001 From: Vinayak khandelwal Date: Sun, 12 May 2024 13:05:23 +0530 Subject: [PATCH 1/4] responsive of the page --- Games/Guess_The_Number/style.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Games/Guess_The_Number/style.css b/Games/Guess_The_Number/style.css index 5e335a7988..de5ef69918 100644 --- a/Games/Guess_The_Number/style.css +++ b/Games/Guess_The_Number/style.css @@ -12,8 +12,9 @@ body { .container { position: absolute; - width: 50%; - min-width: 580px; + width: auto; + margin-top:55px; + min-width: 300px; transform: translate(-50%, -50%); top: 50%; left: 50%; From 6382677eec9a1938da5e70b354ba54f781be5103 Mon Sep 17 00:00:00 2001 From: Vinayak khandelwal Date: Sun, 12 May 2024 13:08:58 +0530 Subject: [PATCH 2/4] responsive of the page --- Games/Guess_The_Number/style.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Games/Guess_The_Number/style.css b/Games/Guess_The_Number/style.css index de5ef69918..99313e3e77 100644 --- a/Games/Guess_The_Number/style.css +++ b/Games/Guess_The_Number/style.css @@ -11,9 +11,12 @@ body { } .container { + position: absolute; + /* responsive */ width: auto; margin-top:55px; + /* min width for device is 300 px */ min-width: 300px; transform: translate(-50%, -50%); top: 50%; From 7524068f1d8ac80839445750c4fb767257823c5f Mon Sep 17 00:00:00 2001 From: Vinayak khandelwal Date: Sun, 12 May 2024 14:49:34 +0530 Subject: [PATCH 3/4] Correct repetiotion of input --- Games/Guess_The_Number/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Games/Guess_The_Number/main.js b/Games/Guess_The_Number/main.js index 42ad5ac618..175301131b 100644 --- a/Games/Guess_The_Number/main.js +++ b/Games/Guess_The_Number/main.js @@ -1,6 +1,7 @@ var guessInput = document.getElementById("guess"); var guessBtn = document.getElementById("my_btn"); const resetBtn = document.querySelector('.reset-btn'); +console.log(guessInput); var msg1 = document.getElementById("message1"); var msg2 = document.getElementById("message2"); @@ -17,7 +18,7 @@ var guesses_num = []; var lives=10; resetBtn.addEventListener('click', reset); -guessBtn.addEventListener('click', play); +// guessBtn.addEventListener('click', play); this line cause repetition of play() function on click guess button guessInput.addEventListener('keypress', function(event) { if (event.key === 'Enter') { play(); From a45018890e7f789802a5ac37b57dc7b8846cd8e2 Mon Sep 17 00:00:00 2001 From: Vinayakkh <94226258+Vinayakkh@users.noreply.github.com> Date: Sun, 12 May 2024 20:49:23 +0530 Subject: [PATCH 4/4] Update style.css