Мой друг создал веб-сайт через Shopify и хотел, чтобы для него был закодирован таймер обратного отсчета, так как они этого не делают. У меня этого нет в Shopify. Я решил попробовать запрограммировать его сам, и в основном все готово, но я не могу его отцентрировать. Как бы глупо это ни звучало, я испробовал все свои знания в области стиля, чтобы центрировать его по центру экрана, но не смог. Как мне это сделать?

Time Left in This Week's Sale:
00d:
00h:
00m:
00s
body {
background-color: #000; /* Black background */
}
.wrap {
position: absolute;
bottom: 0;
top: 0;
left: 0;
right: 0;
margin: auto;
height: 310px;
display: flex; /* Enable flexbox */
justify-content: center; /* Center horizontally */
align-items: center; /* Center vertically */
}
a {
text-decoration: none;
color: #fff; /* White links */
}
/* Title */
h1 {
margin-bottom: 60px;
text-align: center;
font-family: 'Lato', sans-serif;
font-size: 2.25em;
font-weight: 300;
text-transform: uppercase;
}
h1 strong {
font-weight: 400;
color: #fdd835; /* Yellow accent */
}
h2 {
margin-bottom: 80px;
text-align: center;
font-family: 'Lato', sans-serif;
font-size: 0.7em;
font-weight: 300;
text-transform: uppercase;
}
h2 strong {
font-weight: 400;
}
.countdown {
width: 720px;
margin: 0 auto;
}
.bloc-time {
float: left;
margin-right: 45px;
text-align: center;
}
.bloc-time:last-child {
margin-right: 0;
}
.count-title {
display: block;
margin-bottom: 15px;
font-family: 'Lato', sans-serif;
font-size: 0.94em;
color: #fff; /* White text for countdown labels */
text-transform: uppercase;
}
.figure {
position: relative;
float: left;
height: 110px;
width: 100px;
margin-right: 10px;
background-color: #fdd835; /* Yellow background */
border-radius: 8px;
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.2), inset 2px 4px 0 0 rgba(255, 255, 255, 0.08);
}
.figure:last-child {
margin-right: 0;
}
.figure > span {
position: absolute;
left: 0;
right: 0;
margin: auto;
font-family: 'Lato', sans-serif;
font-size: 5.94em;
font-weight: 700;
line-height: 107px;
color: #000; /* Black text */
}
Подробнее здесь: https://stackoverflow.com/questions/793 ... -center-it
Мобильная версия