Skip to content

Commit 778023c

Browse files
Merge pull request #1727 from mnamesujit/fix/container-position
fix: container position over body
2 parents de1f544 + 571b480 commit 778023c

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

Projects/bill tip calculator/style.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
body {
2+
max-width: 100vw;
23
background: rgb(242, 242, 255);
34
color: #081625;
45
display: inline;
@@ -15,7 +16,10 @@ body {
1516
}
1617

1718
.container {
18-
margin: 25px;
19+
position: absolute;
20+
top: 50%;
21+
transform: translateY(-50%);
22+
left: 12%;
1923
display: flex;
2024
flex-direction: column;
2125
align-items: center;
@@ -53,4 +57,13 @@ body {
5357
#single, #multiple {
5458
margin: 30px 0;
5559
font-size: 1.3em;
60+
}
61+
62+
@media screen and (max-width: 468px) {
63+
.container{
64+
left: 50%;
65+
transform: translate(-50%, -50%);
66+
min-width: 95%;
67+
}
68+
5669
}

0 commit comments

Comments
 (0)