Topic: image not showing from local floder for my background

powerwebdesignz pro asked 4 years ago


CSS: .bgphoto { position: relative; height: 100%; background: url('PWDMDB/img/poweronbg.jpg')no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } no matter how i put the class or image in my html it does not show but the MDB image that comes with the template works.

Akhona free commented 4 years ago

Please help me, I have the same problem...the background image is not displaying and I used this exact code.

Marta Wierzbicka staff answered 4 years ago


Try the code from out documentation - https://mdbootstrap.com/css/bootstrap-background-image/. CSS: body, html { height: 100%; } .bg { /* The image used */ background-image: url("https://mdbootstrap.com/img/Photos/Horizontal/Nature/full page/img(20).jpg"); /* Full height */ height: 100%; /* Center and scale the image nicely */ background-position: center; background-repeat: no-repeat; background-size: cover; } HTML: <div class="bg"></div>

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags