Reputation: 102
i try many ways to force my image full width but it can't
you can see my arrows and my html and css code :
<div class="homeContentWrapper">
<!-- WELCOME BOX-->
<div class="imgBghome">
<img class="bgCau" src="images/cau.jpg">
</div>
</div>
and my css
.homeContentWrapper{
position: relative;
height: 726px;
width: 100%;
z-index:0;
}
.imgBghome{
position:relative;
overflow:hidden;
height:100%;
width:100%;
right:0;
left:0;
top:0;
bottom:0;
margin:auto;
z-index:0;
}
please give me advices
thank you!
Upvotes: 0
Views: 1040
Reputation: 1413
You could set the image as a background of the body. It's a clean way of setting a background and you will use no HTML elements.
body {
background-image : url("images/cau.jpg");
background-size : cover;
}
Upvotes: 0