I've been attempting to use JavaScript to hide the border, but it doesn't seem to be working. Is it possible to hide the border in HTML using Java?
.........................
Here is a snippet of my HTML:
<!-- Single Product Details -->
<div class="small-container single-product">
<div class="row">
<div class="col-2">
<img src="Fn_Img/images/_Snake_ White Tee — Yeaaah! Studio.png" width="100%">
<div class="small-img-row">
<div class="small-img-col">
<img src="Fn_Img/images/gallery-1.jpg" width="100%">
</div>
<div class="small-img-col">
<img src="Fn_Img/images/gallery-2.jpg" width="100%">
</div>
<div class="small-img-col">
<img src="Fn_Img/images/gallery-3.jpg" width="100%">
</div>
<div class="small-img-col">
<img src="" width="100%">
</div>
</div>
</div>
CSS style
.single-product{
margin-top: 80px;
}
.single-product .col-2 img{
padding: 0;
cursor: pointer;
}
.single-product .col-2{
padding: 20px;
position: relative;
}
.single-product h4{
margin: 20px 0;
font-size: 22px;
font-weight: bold;
}
.single-product select{
display: block;
padding: 10px;
margin-top: 20px;
}
.single-product input{
width: 50px;
height: 40px;
padding-left: 10px;
font-size: 20px;
margin-right: 10px;
border: 1px solid #000;
}
input:focus{
outline: none;
}
.col-2 img{
border: 1px solid #555;
}
.single-product .fa{
color: #ff523b;
margin-left: 10px;
}
.small-img-row{
display: flex;
justify-content: space-between;
}
.small-img-col{
flex-basis: 24%;
}
The issue at hand:
- I would like the border to disappear if there is no image present.
- If there is no image, I want the padding to remain unchanged.