Home > Software engineering >  The border won't cover the background image
The border won't cover the background image

Time:06-13

Can anyone help me to bordered cover the image? I need this for my website culminating and theThe border won't fully cover my background

Here's the picture of it [1]: https://i.stack.imgur.com/3qj0D.jpg

Here my is html code

<div >

<img src="images/HD-High-Tech-Background.jpg" alt="High Tech- 
Background" style="width:100%;">


<div ></div>

<div ></div>

<div ></div>

<div ></div>

</div>
<div >Computer Technology</div>

Here's my css

.bg-container {
border: 5px solid #D1270B; 

height:100%; 

box-sizing:border-box; 

width:100%;


}

.centered {
padding-top:2em;


}

CodePudding user response:

Set padding top and try again.

CodePudding user response:

I think this code help you

  • add css on website like
*{
 Padding:0;
 Margin:0;
 box-sizing:border-box;
;

CodePudding user response:

Add padding-bottom as you want to cover your border. Also, you can remove this padding and make it positioned.

.centered {padding-top:2em;}
  • Related