First let me note that the first media type you use is from a
candidate recommendation intended for HTML 5. I don't know whether
Android's browser implements it. But it should implement the second.
Probably not relevant to your problem... The current candidate
recommendation is at http://www.w3.org/TR/css3-mediaqueries/

You seem to be saying that your .css file includes the lines:
<style>
and
</style>

These should NOT be part of a .css file, which is not XML, nor HTML,
nor SGML-derived in any form.  That would be my initial guess as to
your problem.


On Oct 31, 9:43 pm, Ellen <[email protected]> wrote:
> 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>

-- 
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