How To Set Webview Content In Center?
I am loading some HTML content in WebView but its always coming in the top left corner of my WebView. I have tried to use stylesheet also, in stylesheet I have added center related
Solution 1:
try this:
<html><head><styletype="text/css">@font-face { font-family: MyCustomFont;
src:url("~/android_asset/fonts/MyriadPro-Regular.otf") }
#text{ font-family: MyCustomFont;
font-size:14;
text-align: center;
margin:350px;
line-height: normal;
color:blue;
height:20px;
width:100px;
margin:auto;
background-color:red;
}
</style></head><body><pid="text"> Hello World</p></body></html>
And I think that your address source font is mistake!
Post a Comment for "How To Set Webview Content In Center?"