why background image not display?


I am trying to make simple app single page app .Actually I take background image which is placed on it display when I used <ion-content class="bg" style="position:absolute!important"> position:absolute but it display in small area .I need to display on whole contend .In other words in whole contend tag complete screen. here is my code


<html ng-app="ionicApp">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>Ionic List Directive</title>

    <link href="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
    <script src="//code.ionicframework.com/nightly/js/ionic.bundle.js"></script>

  <body >
      <ion-header-bar class=" bar bar-positive ">
      <h1 class="title">Title!</h1>    

      <ion-content class="bg"  style="position:absolute!important">
          <h1 >contend</h1>
          <ion-footer-bar class=" bar bar-footer bar-positive" style="position:fixed!important">
           <h1 class="title">Fotter!</h1>



Because your content has a bg class which doesn't cover all of your page. You set bg class's background, not the body's background. You should do this: http://codepen.io/anon/pen/pvYpVw

{background: url('https://d262ilb51hltx0.cloudfront.net/max/800/1*AJALCafqXhfLMG7iF7Ho0A.jpeg')!important;}

You should update css rule for class bg. The easiest way is to just add: top:0; left:0; right:0; bottom:0; to the bg class.

You could just add

height: 100%;
width: 100%;

to your .bg css rule

By : Phe0nix

This video can help you solving your question :)
By: admin