У меня есть div, как показано на рисунке ниже, и на этом рисунке вы можете видеть тонкую серую линию из той части, которая мне нужна, чтобы покрыть все это другим цветом. Я имею в виду, что левая часть будет иметь цвет BG по умолчанию, но правая сторона будет иметь некоторый цвет BG. заранее спасибо
.root_class {
display: flex;
justify-content: center;
align-items: center;
width: 75%;
margin: 0 auto;
}
.text {
font-size: 3rem;
// color: #bbb;
margin: 0;
margin-right: 10rem;
}
.percentile-card {
transition: 0.3s;
margin: 1rem;
padding: 5px;
border-left: 2px solid #ccc;
}
.percentile-card p {
margin: 0;
}
.percentile-card p:first-child {
color: #bbb;
}
@media (max-width: 768px) {
.root_class {
flex-direction: column;
}
.text {
font-size: 2rem;
margin-right: 0rem;
}
}
<div class="border root_class rhs-background">
<p class="text">Where Do i Stand Overall ?</p>
<div class="percentile-card text-center">
<h4>You did better Than</h4>
<i class="fa fa-users pull-left" style="margin-left: 40px;" aria- hidden="true"></i>
<h5><b>60%</b></h5>
</div>
</div>
Я пробовал это
.rhs-background {
position: fixed;
top: 0px;
left: 0px;
width: 50%;
height: 100%;
background-color: pink;
z-index: 1;
}