-1

background error

I'm working on this movie website and put a background. I want the background to repeat itself and cover the whole page even if I scroll down but for some reason I can't fix it. I tried searching for it and tried every solution I got from google but all in vain. This is my code for background image. I tried changing the value of back-ground repeat to repeat-y but still it didn't work. Any hints on what to do?

/*------ Background image ------*/
.bg-image {
/* The image used */
background-image: url("bgd.jpg");

/* Add the blur effect */
filter: blur(4px);
-webkit-filter: blur(4px);

/* Full height */
height: 100%;


/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}

/* ------------------------ */
Ramsha Khalid
  • 126
  • 1
  • 2
  • 14

2 Answers2

0

Set background style properties directly with body tag. Use background-repeat: repeat.Also you can use !important to overwrite some css property. i.e

body {
/* The image used */
background-image: url("bgd.jpg");



/* Center and scale the image nicely */
background-position: center;
background-repeat: repeat;
background-size: cover;
}
Ishtiaq
  • 238
  • 1
  • 2
  • 9
0

You should make the div absolute if you want to have the blur

.bg-image{
position:absoulte;
width:100%;
height:100%;
left:0;
top:0;
// existing background css
}
Abdullah Razzaki
  • 972
  • 8
  • 16