In my HTML code, I have a div with the class "card" which contains a footer:
<div className='card'>
<img src={thumb2} />
<footer>
<p>Beautiful and cozy house for you and your family</p>
<span>$1200.00/month</span>
</footer>
</div>
The footer inside the div with the class card is styled as follows:
.card footer {
background-color: #D6E4E3;
display: flex;
flex-direction: column;
align-items: center;
margin: 0;
padding: 0;
}
However, when I use another footer tag elsewhere in my page, its style affects the footer inside the card as well. How can I prevent this from happening? Is there a way to apply different styles to multiple footer tags without them conflicting?
footer {
height: 5%;
display: flex;
justify-content: center;
background-image: linear-gradient(#5665e7, #7083E5);
}