3
Guys set up a simple container using CSS. For me to do the DIV
that gets the text stick with blue background I ground a class I created to put background where I call it. But I need to put the blue border on DIV
which receives the content. How do I make the border inherit the class color
bg-blue-3
? If possible I wanted to do this in HTML, because I will create several containers with different colors.
.bg-blue-3 {
background-color: #42A5F5 !important;
}
.step-container {
margin: 0 auto;
border:1px solid;
border-radius: 3px;
background:#FFFFFF;
}
.step-container-head {
padding: 10px;
color: #ffffff;
text-align: center;
}
.step-container-body {
padding: 10px;
}
<div class="step-container container-width">
<div class="step-container-head bg-blue-3">
TEXTO
</div>
<div class="step-container-body">
conteudo
</div>
</div>
It is not possible via CSS to import the color of a next of kin. With CSS pre-compilers like Stylus it is possible to create variables and so do a little DRY and only put color in 1 place and the variable propagate it. But native CSS does not give.
– Sergio