From 45a4d9b07800e0d38d3d5352ceb86c124c64cb88 Mon Sep 17 00:00:00 2001
From: Siddhartha Mishra <76718773+sidddharthamishra@users.noreply.github.com>
Date: Wed, 31 Aug 2022 13:42:15 +0530
Subject: [PATCH 1/2] Update style.css
add media quert
---
5-dom-array-methods/style.css | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/5-dom-array-methods/style.css b/5-dom-array-methods/style.css
index 67894cd..6c631e3 100644
--- a/5-dom-array-methods/style.css
+++ b/5-dom-array-methods/style.css
@@ -52,6 +52,7 @@ h2 {
margin: 0 0 20px;
}
+
h3 {
background-color: #fff;
border-bottom: 1px solid #111;
@@ -68,3 +69,12 @@ h3 {
font-size: 20px;
margin-bottom: 10px;
}
+@media (max-width: 545px) {
+ .item-name {
+ font-size: 17px;
+ }
+ .item-money {
+ font-size: 17px;
+ margin-left: 10px;
+ }
+}
From b92191ac9108df19912e206da591b9b61d951603 Mon Sep 17 00:00:00 2001
From: Siddhartha Mishra <76718773+sidddharthamishra@users.noreply.github.com>
Date: Wed, 31 Aug 2022 13:43:51 +0530
Subject: [PATCH 2/2] Update script.js
---
5-dom-array-methods/script.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/5-dom-array-methods/script.js b/5-dom-array-methods/script.js
index 7a79fcf..bda8904 100644
--- a/5-dom-array-methods/script.js
+++ b/5-dom-array-methods/script.js
@@ -69,7 +69,9 @@ function updateDOM(providedData = data) {
providedData.forEach((item) => {
const element = document.createElement('div');
element.classList.add('person');
- element.innerHTML = `${item.name} ${formatMoney(item.money)}`;
+ element.innerHTML = `${
+ item.name
+ }${formatMoney(item.money)} `;
main.appendChild(element);
});
}