1

I search the solution on this forum and on internet, most solution available but nothing work for my case... Or I don't understand maybe.

I have a background image, and I would like this take 100% of width and same value for the height.

.top-section {
  background: url('../img-content/Bg1.png') no-repeat center center fixed;
  background-size: cover;
}
<div class="top-section"></div>
KolaCaine
  • 2,037
  • 5
  • 19
  • 31

1 Answers1

2
html, body {   height: 100%; }

.top-section {    
  width: 100%;   
  height: 100%;   
  background-image: url("'../img-content/Bg1.png");   
  background-attachment: fixed;   background-size: cover; 
}

For other Image use similar

.top-section2 {
  width: 100%;   
  height: 100%;   
  background-image: url("");
  background-size: cover;
}
Aymen
  • 1,476
  • 18
  • 28