This HTML & CSS only challenge is perfect for anyone just starting out or anyone wanting a small project to play around with.
+
Your users should be able to:
+ 1. View the optimal layout depending on their device's screen size
+ 2. See hover states for interactive elements
+
+## Built with
+
+- Semantic HTML5 markup
+- CSS custom properties
+- Flexbox
+- Grid
+- Desktop-first workflow
+
+## What I learned
+
+The postioning of elements and centering of elements was a bit of a challange. But it worked out in the end. Still applying a overlay over elements seemed to be challenging
diff --git a/images/favicon-32x32.png b/images/favicon-32x32.png
new file mode 100644
index 0000000..1e2df7f
Binary files /dev/null and b/images/favicon-32x32.png differ
diff --git a/images/icon-cart.svg b/images/icon-cart.svg
new file mode 100644
index 0000000..c5b3d1b
--- /dev/null
+++ b/images/icon-cart.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/icon-close.svg b/images/icon-close.svg
new file mode 100644
index 0000000..44ed6ff
--- /dev/null
+++ b/images/icon-close.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/icon-delete.svg b/images/icon-delete.svg
new file mode 100644
index 0000000..052e485
--- /dev/null
+++ b/images/icon-delete.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/icon-menu.svg b/images/icon-menu.svg
new file mode 100644
index 0000000..aeadad3
--- /dev/null
+++ b/images/icon-menu.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/icon-minus.svg b/images/icon-minus.svg
new file mode 100644
index 0000000..bcbd4d1
--- /dev/null
+++ b/images/icon-minus.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/icon-next.svg b/images/icon-next.svg
new file mode 100644
index 0000000..d4c47f5
--- /dev/null
+++ b/images/icon-next.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/icon-plus.svg b/images/icon-plus.svg
new file mode 100644
index 0000000..a381026
--- /dev/null
+++ b/images/icon-plus.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/icon-previous.svg b/images/icon-previous.svg
new file mode 100644
index 0000000..d567ad0
--- /dev/null
+++ b/images/icon-previous.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/image-avatar.png b/images/image-avatar.png
new file mode 100644
index 0000000..8540104
Binary files /dev/null and b/images/image-avatar.png differ
diff --git a/images/image-product-1-thumbnail.jpg b/images/image-product-1-thumbnail.jpg
new file mode 100644
index 0000000..0730ac8
Binary files /dev/null and b/images/image-product-1-thumbnail.jpg differ
diff --git a/images/image-product-1.jpg b/images/image-product-1.jpg
new file mode 100644
index 0000000..f7e0975
Binary files /dev/null and b/images/image-product-1.jpg differ
diff --git a/images/image-product-2-thumbnail.jpg b/images/image-product-2-thumbnail.jpg
new file mode 100644
index 0000000..558c8d5
Binary files /dev/null and b/images/image-product-2-thumbnail.jpg differ
diff --git a/images/image-product-2.jpg b/images/image-product-2.jpg
new file mode 100644
index 0000000..dc235b2
Binary files /dev/null and b/images/image-product-2.jpg differ
diff --git a/images/image-product-3-thumbnail.jpg b/images/image-product-3-thumbnail.jpg
new file mode 100644
index 0000000..f9156f7
Binary files /dev/null and b/images/image-product-3-thumbnail.jpg differ
diff --git a/images/image-product-3.jpg b/images/image-product-3.jpg
new file mode 100644
index 0000000..b70596d
Binary files /dev/null and b/images/image-product-3.jpg differ
diff --git a/images/image-product-4-thumbnail.jpg b/images/image-product-4-thumbnail.jpg
new file mode 100644
index 0000000..db609d0
Binary files /dev/null and b/images/image-product-4-thumbnail.jpg differ
diff --git a/images/image-product-4.jpg b/images/image-product-4.jpg
new file mode 100644
index 0000000..e27b340
Binary files /dev/null and b/images/image-product-4.jpg differ
diff --git a/images/logo.svg b/images/logo.svg
new file mode 100644
index 0000000..5d6c296
--- /dev/null
+++ b/images/logo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/project-preview.png b/images/project-preview.png
new file mode 100644
index 0000000..9de9fb9
Binary files /dev/null and b/images/project-preview.png differ
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..1c3b57c
--- /dev/null
+++ b/index.html
@@ -0,0 +1,288 @@
+
+
+
+
+
+
+
+ [E-commerce product page] | Frontend Mentor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Sneaker Company
+
Fall Limited Edition Sneakers
+
+ These low-profile sneakers are your perfect casual wear companion.
+ Featuring a durable rubber outer sole, they’ll withstand everything
+ the weather can offer.
+
+
`
+
+ if (!checkout_preview_btn.classList.contains('none'))
+ checkout_preview_btn.classList.add('none')
+}
+function getProductNumber(url) {
+ // Extract the filename from the URL
+ const filename = url.split('/').pop()
+
+ // Extract the product number from the filename (assuming it's the first part before the hyphen)
+ const productNumber = filename.split('-')[2]
+
+ return productNumber
+}
+
+hamburger_icon_container.addEventListener('click', () => {
+ nav_links_container.classList.add('show')
+})
+
+close_icon_container.addEventListener('click', () => {
+ nav_links_container.classList.remove('show')
+})
+
+plus_icon.addEventListener('click', () => {
+ counter++
+ count.textContent = counter
+})
+
+minus_icon.addEventListener('click', () => {
+ if (counter > 0) counter--
+ count.textContent = counter
+})
+
+previous_icon.addEventListener('click', () => {
+ // Get the current left style value as a number
+ const currentLeft = parseFloat(product_img.style.left) || 0 // Handle cases where left is not set
+
+ // Calculate the new left position
+ let newLeft = currentLeft + 100 // Subtract 100vw from the current value
+
+ if (newLeft > 0) newLeft = -300
+
+ if (product_img.children.length * 100 <= Math.abs(newLeft)) {
+ newLeft = 0
+ }
+
+ // Set the new left style with units (vw)
+ product_img.style.left = `${newLeft}vw`
+})
+
+next_icon.addEventListener('click', () => {
+ // Get the current left style value as a number
+ const currentLeft = parseFloat(product_img.style.left) || 0 // Handle cases where left is not set
+
+ // Calculate the new left position
+ let newLeft = currentLeft - 100 // Subtract 100vw from the current value
+
+ if (product_img.children.length * 100 <= Math.abs(newLeft)) {
+ newLeft = 0
+ }
+
+ // Set the new left style with units (vw)
+ product_img.style.left = `${newLeft}vw`
+})
+
+add_to_cart_btn.addEventListener('click', () => {
+ item_count.textContent = counter
+
+ if (counter > 0) {
+ checkout_preview_item.innerHTML = `
+
+
+
+
+
+ Fall Limited Edition Sneakers
+
+
+ $125.00 x ${counter}
+ \$${(counter * 125).toFixed(2)}
+