I have been following a tutorial I found on Youtube for building a website with bootstrap. It has been going good. Until now. I have spent 3 days trying to find what I did wrong in the code but I have been unable to see it myself.
I am trying to do is make some font awesome icons appear on a picture as you hover over the image. I have all the icons showing. These 2 icons (the eye and the shopping cart) stop showing after I move them with the CSS. I checked my code with the tutorial and it matches but his works but mine does not. I added the code for both the HTML and CSS. If you can see what I am doing wrong It could really help. I am trying to actually make this work. I really like this feature and would eventually like to use this on a website I will be using.
Thank you in advance.
HTML:
CSS:
I am trying to do is make some font awesome icons appear on a picture as you hover over the image. I have all the icons showing. These 2 icons (the eye and the shopping cart) stop showing after I move them with the CSS. I checked my code with the tutorial and it matches but his works but mine does not. I added the code for both the HTML and CSS. If you can see what I am doing wrong It could really help. I am trying to actually make this work. I really like this feature and would eventually like to use this on a website I will be using.
Thank you in advance.
HTML:
HTML:
<section class="new-products">
<div class="container">
<div class="title-box">
<h2>New Products</h2>
</div>
<div class="row">
<div class="col-md-3">
<div class="product-top">
<img src="assets/image/soapboutique.jpg">
<div class="overlay-right">
<button type="button" class="btn btn-secondary" title="Quick Shop">
<i class="fa-solid fa-eye"></i>
</button>
<button type="button" class="btn btn-secondary" title="Add to Cart">
<i class="fa-solid fa-cart-plus"></i>
</button>
</div>
</div>
<div class="product-bottom text-center">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
<h3>Soap</h3>
<h5>$4.00</h5>
</div>
</div>
</div>
</div>
</section>
CSS:
CSS:
.product-top img
{
width: 100%;
}
.overlay-right
{
display: block;
opacity: 0;
position: absolute;
top: 10%;
margin-left: 0;
width: 70px;
}
.overlay-right .fa
{
cursor: pointer;
background-color: #fff;
color: #000;
height: 35px;
width: 35px;
font-size: 20px;
padding: 7px;
margin-top: 5%;
margin-bottom: 5%;
}
.overlay-right .btn-secondary
{
background: none !important;
border: none !important;
box-shadow: none !important;
}
.product-top:hover .overlay-right
{
opacity: 1;
margin-left: 5%;
transition: 0.5s;
}