20. Matching WCSS Cascading Style Sheets to Different User Agents
As discussed earlier in this WCSS tutorial, a major advantage of introducing WCSS cascading style sheet to your mobile Internet application is that it enables you to place the content of your site in XHTML MP files and the presentation information in separate WAP CSS files.
For example, let's say you know that most of the users will visit your site using Nokia's mobile phone browser and Microsoft's Internet Explorer. When people use Nokia's mobile phone browser to visit your site, they view your site in a small screen; when people use Microsoft's Internet Explorer to visit your site, they view your site in a large screen of their PC. You can define a WAP CSS cascading style sheet for the Nokia mobile phone browser and another one for Microsoft Internet Explorer to control the layout of the content, so that your site can look good in both small and large screens. In this way, you just need to manage one version of your site's content, instead of managing one version for the Nokia mobile phone browser and another version for IE. Isn't that convenient?
To match the layout and formatting of your WAP site to different user agents, first you need to know how to detect the user agent. Since user agent detection is a big topic in mobile Internet application development, we will cover the details in a separate article in the future. In this section, we will only give an introduction of user agent detection and several simple examples that help you understand its use.
Previous Page | Page 36 of 39 | Next Page |
- 1. WCSS (WAP CSS) Introduction
- 2. Wireless CSS and Wireless Profile CSS
- 3. Advantages of Using WAP CSS Style Sheets on Mobile Internet Sites
- 4. Disadvantages of Using WAP CSS Style Sheets on Mobile Internet Sites
- 5. Syntax Rules of WCSS
- 6. Comments in WCSS
- 7. How to Apply WCSS Styles to an XHTML MP Document
- 8. Different Types of Selectors
- 9. Div and Span Element of XHTML MP
- 10. Cascading Rules for Handling Multiple Groups of WCSS Styles Applied to the Same Element
- 11. Common Types of Property Value
- 12. WCSS Font and Text Properties
- 13. WCSS List Properties
- 14. WCSS Color Properties
- 15. WCSS Border Properties
- 16. WAP Specific Extensions to CSS
- 17. WCSS Access Key Extension
- 18. WCSS Input Extension
- 19. WCSS Marquee Extension
- 20. Matching WCSS Cascading Style Sheets to Different User Agents