From 5e587836894087af9e8940937c60e50075907ee4 Mon Sep 17 00:00:00 2001 From: Mahdi Majdian Date: Tue, 25 May 2021 23:38:39 +0430 Subject: [PATCH] mobile responsive layout complete --- index.html | 12 +++++----- style.css | 64 +++++++++++++++++++++++++++++++----------------------- 2 files changed, 43 insertions(+), 33 deletions(-) diff --git a/index.html b/index.html index 37f2fdc..9292e4d 100644 --- a/index.html +++ b/index.html @@ -23,18 +23,18 @@
Spicy Rote Pasta and Cheese
-
139.01$
-
4.6
-
+
139.01$
+
4.6
+
-
-
+
+
-
Total: $
+
Total: $
diff --git a/style.css b/style.css index 7f7fc7d..8adb2c1 100644 --- a/style.css +++ b/style.css @@ -44,8 +44,8 @@ body { height: 100%; width: 18rem; left: 50%; - transform: translateX(-50%); top: 3rem; + transform: translateX(-50%); background: url(assets/header-img.png) no-repeat; background-position: center; background-size: contain; @@ -160,12 +160,15 @@ body { .content { position: absolute; top: 10rem; - right: 19rem; + right: 20rem; left: 0rem; bottom: 0; overflow-y: scroll; overflow-x: hidden; } +.content::-webkit-scrollbar{ + display: none; +} .flex { display: flex; justify-content: center; @@ -344,44 +347,61 @@ body { .header-img { width: 14rem; } + .header-p1 { + font-size: 2.4rem; + } + .header-p2 { + font-size: 2.4rem; + } +} +@media screen and (max-width: 1100px) { .header-p1 { font-size: 1.5rem; } .header-p2 { font-size: 1.5rem; } + .header-content { + width: 100%; + } } @media screen and (max-width: 768px) { + .header { + height: 10rem; + } .header-content { width: 100%; } .header-img { width: 12rem; + top: 0rem; + transform: translateX(-50%); } .header-p1 { font-size: 1.5rem; right: calc(50% + 5rem); + top: 25%; } .header-p2 { font-size: 1.5rem; left: calc(50% + 5rem); + top: 25%; } - .content { - top: 10rem; + top: 5rem; right: 0; left: 0; - bottom: 0; + bottom: 15vh; overflow-x: hidden; - } .panel { width: 100%; position: absolute; - top: calc(100vh + 10rem); - height: calc(100vh - 10rem); + top: 85vh; right: 0; + height: auto; + } .details-box { width: 75%; @@ -398,27 +418,19 @@ body { } } @media screen and (max-width: 500px) { - .header-img { width: 8rem; } - - .content { - top: 10rem; - right: 0; - left: 0; - bottom: 0; - overflow-x: hidden; - + .popup__order img { + width: 10rem; + height: 10rem; } - - .panel { - width: 100%; - position: absolute; - top: 100vh; - height: calc(100vh - 10rem); - right: 0; + .popup__order { + font-size: 1.5rem; } + + + .details-box { width: 75%; margin: 1rem; @@ -429,9 +441,7 @@ body { width: 75%; } .header-overlay { - - border-radius:0; - + border-radius: 0; } .box { width: 100%;