Я пытаюсь создать совпадение соответствия, которое отображает информацию соответствия. Однако все они должны быть разных размеров, и похоже, что он не хочет центрироваться должным образом. Я хочу, чтобы весь этот текст был центрирован в середине div? Как это может быть сделано?текст в вертикальном центре с разностными размерами
\t .saperator {
margin-right: 17px;
vertical-align: text-bottom;
color: #787878;
}
.result-in-month {
padding: 25px 20px;
background: #efefef;
margin-bottom: 10px;
border-radius: 4px;
border: none;
transition: all 0.45s ease-in-out 0s;
position: relative;
}
.result-in-month:hover {
background: #FFF;
box-shadow: 0px 0px 3px 1px #e5e5e5;
}
.result-in-month {
padding: 20px 30px;
font-size: 15px;
}
.result-date {
display: inline-block;
width: 12%;
margin-right: 2%;
font-size: 12px;
font-weight: 400;
text-transform: uppercase;
line-height: 40px;
}
.result-stream {
display: inline-block;
width: 12%;
text-transform: uppercase;
line-height: 40px;
text-align: right;
color: #212121;
font-size: 36px;
}
.result-stream a:hover {
text-decoration: none;
}
.result-match-team-wrapper {
display: inline-block;
width: 72%;
text-align: center;
text-transform: uppercase;
line-height: 40px;
font-weight: normal;
font-size: 18px;
}
.result-match-versus {
padding: 0px 3px;
font-weight: normal;
color: #999999;
}
.result-match-team.left {
margin-right: 2.5%;
text-align: right;
}
.result-match-team.right {
margin-left: 2.5%;
text-align: left;
}
.result-match-team {
display: inline-block;
width: 40%;
}
.result-match-separator {
margin: 0px 2.5%;
}
#nav {
margin-left:0px !important;
}
#nav li {
display: inline-block;
padding: 4px 11px;
background-color: #fff;
margin-right: 6px;
}
#nav li a {
color: #000;
text-decoration: none;
text-transform: uppercase;
font-size: 18px;
font-weight: 400;
font-family: Oswald, Impact, sans-serif !important;
}
#nav li.active {
background-color: #000;
}
#nav li.active a {
color: #fff;
}
\t \t \t \t <div class="result-in-month">
\t \t \t
\t \t <div class="result-date">
\t \t SLUT \t \t
\t \t
\t \t </div>
\t \t <div class="result-match-team-wrapper">
\t \t <span class="result-match-team left">
\t \t TEAM 3
\t \t </span>
\t \t <span class="result-match-versus">
\t \t VS
\t \t </span>
\t \t <span class="result-match-team right">
\t \t TEAM 1
\t \t </span>
\t \t </div>
\t \t <div class="result-stream">
\t \t \t <span class="result-match-score" >2</span><span class="result-match-separator">-</span><span class="result-match-score">1</span>
\t \t
\t \t </div>
\t \t <div class="clear"></div>
\t \t </div>
Эта статья на css-tricks.com объясняет способ лучше, как центрирования текста, чем я мог : [centering-css-complete-guide] (https://css-tricks.com/centering-css-complete-guide/) – Sjoerd
Эй, ПитерПик, как вы поживаете? –