0

I have a HTML page in which i have a page and inside it i have a content and inside it i have a div now when i set the image of last div . there show white space below the image and make the html page in scroll position. I don't want white space and want to fit the page according to the device height and width. But i am unable to achieve it any help would be highly appreciated

Here is my code :

<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="user-scalable=no" id="viewport_meta" />
        <script type="text/javascript">
            var viewport_meta = document.getElementById('viewport_meta');
            var w = screen.availWidth;
            var h = screen.availHeight;
            viewport_meta.setAttribute('content', 'width=' + w + ', height=' + h + ',user-scalable=no');
        </script>
        <script src="tizen-web-ui-fw/latest/js/jquery.js"></script>
        <script src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js" data-framework-viewport-scale="false"></script>
        <script type="text/javascript" src="./js/main.js"></script>
        <script type="text/javascript" src="./js/swipe.js"></script>
        <script src="tizen-web-ui-fw/latest/js/jquery.min.js"></script>
        <script type="text/javascript" src="./jquery.mobile-1.3.0.js"></script>
        <link rel="stylesheet" type="text/css" href="./css/style.css" />
    </head>

    <body>
        <div data-role="page" id="page1">
            <div data-role="content" data-scroll="none">
                <div id="fullpage"></div>
            </div>
        </div>
    </body>

</html>

On div id full page i have set background image:

body {
    background-repeat: no-repeat;
    margin: 0;
    overflow: hidden;

}

div {
    width: 1280px;
    height: 720px;
}

#page1{
    width: 1280px;
    height: 720px;
}



#fullpage {
    background-image: url(../images/lastslide_en_752.jpg);
     background-repeat:no-repeat;
      background-size:60% 60%;
}
User42590
  • 2,473
  • 12
  • 44
  • 85

1 Answers1

0

consider adding

 background-repeat:no-repeat; background-size:100% 100%; 

in the #fullpage Class

Lepanto
  • 1,413
  • 1
  • 8
  • 15
  • i did this but not working.. And please see my updated css part of question – User42590 Jun 15 '13 at 11:39
  • if you want the width and height adjust to device size, why you specify them in CSS. And also why background-size:60% 60%;? instead of 60% make it 100% – Lepanto Jun 15 '13 at 12:16