2

I'm having trouble adapting my web page,

So far I have added

webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);

the meta tag

<meta content='height=device-height, width=device-width, initial-scale=1.0' name='viewport' />

and here's the css of the page

       <style type="text/css">
html {
    width : 800px;
    height : 522px;
}
body {

    background-color:#999999;
    margin:0;
    padding:0;
    color:#FFFFFF;
    width : 800px;
    height : 522px;
    font-family:Verdana, Geneva, sans-serif;
    font-size:16px; 
    line-height:150%;
}
a{
    color:#ffd901;
    text-decoration:none;

}
img {
    border:0;
}
#content {
    position : fixed;
    background-color:#FFFFFF;
    overflow:hidden;
}

#accueil {
    width : 800px;
    height : 522px;
    z-index:1;

/*
    background-color:#000;
*/
    background-image:url("img/fondb.jpg");
    background-repeat:no-repeat;

}
#copyright{
    position:absolute;
    font-size:10px; 

    text-align:center;
    left:0px;
    top:500px;
    width:800px;
    
}
#logo{
    position:absolute;
    left:670px;
    top:410px;
    
}
#titre{
    position:absolute;
    left:50px;
    top:5px;    
}
#texte{
    position:absolute;
    left:60px;
    top:77px;
}
#btn_imprimer{
    position:absolute;
    left:590px;
    top:107px;
}

</style>

which gives something like thisphoto

I want my content to fit the screen

Community
  • 1
  • 1
Mike Bryant
  • 2,455
  • 9
  • 39
  • 60
  • Please refer to this question http://stackoverflow.com/questions/3916330/android-webview-webpage-should-fit-the-device-screen – Ajay nath Jul 22 '13 at 11:22

1 Answers1

0

Use double quotes

<meta name="viewport" content="width=device-width,height=device-height, user-scalable=no" />

Edited

I notice you have set px values for your body and html width and height. I would advise you change this so then your body and html have width: 100%; height: 100%;

Kevin Lynch
  • 24,427
  • 3
  • 36
  • 37