working
working

Reputation: 893

Style HTML pages in WebView using CSS

I am looking for a tutorial which will guide me to style HTML pages using CSS so that they can be viewed on an android phone. The CSS should be such that it should incorporate all types of devices in terms of size and display functionality.

Upvotes: 1

Views: 291

Answers (2)

Christofer Eliasson
Christofer Eliasson

Reputation: 33865

For a web page to adapt to screen-resolution, you will have to look in to the concept of responsive design. Responsive web pages can be accomplished using CSS3 media-queries.

Here are a few resources on responsive design and CSS3 media-queries to get you started:

Responsive design:

Media-queries:

Cross-browser support:

Unfortunately older browsers does not support the necessary media-queries for responsive design. Therefor, if you need to support IE8 for instance, you will have to use a JavaScript to enable it for browsers the lack native support. Have a look at respond.js, which I've found very useful the times I've used it.

Upvotes: 1

Jezen Thomas
Jezen Thomas

Reputation: 13800

You should look into CSS media queries.

Upvotes: 0

Related Questions