Answers for "background image size always fit the div"

CSS
1

stretch background image to fit div

body {
    background-image:url("../images/myImage.jpg");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}
Posted by: Guest on October-03-2021
0

how to cover entire div with background image

.divname{
	background-image: url(""); 
    background-repeat: no-repeat;
    background-size: cover;
    width: 100%; 
    height: 100%; 
    
}
Posted by: Guest on September-09-2021

Code answers related to "background image size always fit the div"

Browse Popular Code Answers by Language