http://techdroid.kbeanie.com/2010/10/android-webview-javascript-and-css.html

Hope that helps.

On Mon, Nov 1, 2010 at 6:56 PM, Ellen <[email protected]> wrote:

> Hello,
>
> I want to know how to use CSS to control the style of HTML.
> it looks like anything defined in CSS does not apply to HTML.
> here is the mytest.html
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
> www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <title> TEST PAGE </title>
>
> <link type="text/css" rel="stylesheet" media="only screen and (max-
> device-width: 480px)" href="android.css" />
> <link rel="stylesheet" href="android.css" media="handheld" type="text/
> css" />
>
> </head>
> <body>
> <br><br>
> <h1>This header is 36 pt</h1>
> <br><br>
> go to
> <br><br>
> </body>
> </html>
>
>
>
> here is the android.css:
>
> <style>
> @media handheld {
>   body {
>     background-color:yellow;
>   }
>  h1
> {
> font-size:35pt;
> color:blue;
>
> }
>  }
>  @media only screen and (max-device-width: 480px) {
>   body {
>      background-color:yellow;
>   }
>     h1
> {
> font-size:36pt;
> color:blue;
>
> }
>  }
> </style>
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to