Welcome to Developers' Home Friday, July 3, 2009
Home - DevelopersHome.com
Home Preferences
Mobile Internet Browsing (WAP) WAP Server Setup Tutorial Quick Links: Introduction How to Publish WAP 1.x / WAP 2.0 Content WAP 1.x / WAP 2.0 MIME Types and File Extensions Setting up MIME Types on WAP Servers Setting MIME Types with a htaccess File Setting MIME Types with Server-side Technologies Setting up Default Documents
WML Tutorial Quick Links: WML Introduction WML Deck and Card Font Size and Style WML Images WML Tables WML Anchor Links Programming Softkeys of Mobile Phones WML Template and Menu WML Events WML Selection Lists WML Input Fields WML Variables Submit Form Data Clear Saved Forms
WMLScript Tutorial Quick Links: WMLScript Introduction Compiling WMLScript Code WMLScript Language Rules Defining Functions Calling Functions WMLScript Variables WMLScript Variables Vs WML Variables Passing Arguments By Value and By Reference WMLScript Operators WMLScript Conditional WMLScript Looping WMLScript Standard Libraries WMLScript Arrays Validate Form Data
WMLScript Standard Libraries Reference Quick Links: WMLBrowser Library Dialogs Library String Library Float Library Lang Library URL Library
XHTML MP Tutorial Quick Links: XHTML MP Introduction Development of Wireless Markup Languages Advantages of XHTML MP WML Features Lost in XHTML MP Syntax Rules of XHTML MP XHTML MP MIME Types and File Extension XHTML MP Document Structure XHTML MP Generic Metadata XHTML MP Images XHTML MP Anchor Links XHTML MP Selection Lists XHTML MP Input Elements Submit Form Data
WAP CSS / WCSS Tutorial Quick Links: WCSS Introduction Syntax Rules of WCSS How to Apply Cascading Style Sheets to Documents WCSS Selectors Div and Span Elements Cascading Rules WCSS Font/Text Properties WCSS List Properties WCSS Color Properties WCSS Border Properties WCSS Access Key Extension WCSS Input Extension WCSS Marquee Extension Matching Style Sheets to Different User Agents
Detect User Agent Types and Device Capabilities Quick Links: Introduction The Accept Header The User-Agent Header The Accept-Charset Header The Accept-Language Header The x-wap-profile and Profile Headers How to Read the Value of an HTTP Header How to Use UAProf (User Agent Profile)
UAProf / User Agent Profile Reference Quick Links: HardwarePlatform Component SoftwarePlatform Component NetworkCharacteristics Component BrowserUA Component WapCharacteristics Component PushCharacteristics Component MmsCharacteristics Component
Upload Files From WAP Cell Phones Quick Links: How to Upload Files from WAP Cell Phones XHTML MP Example Handling File Uploads with PHP Handling File Uploads with JSP / Java Servlet Security Considerations of File Upload
Sample Book Chapters Adapting to User Devices Quick Links: Introduction to Adaptation of Mobile Sites Using WALL in Mobile Sites Using WURFL for Detecting Devices and Capabilites Other Open Source Tools for Adaptation
Mobile Messaging SMS Tutorial Quick Links: Introduction to SMS What Makes SMS Messaging So Successful Example SMS Applications SMS Center / SMSC Basic Concepts of SMS Intra-operator SMS Inter-operator SMS International SMS SMS Gateway How to Send SMS Messages from Computers How to Receive SMS Messages with Computers Introduction to GSM / GPRS Wireless Modems How to Use HyperTerminal Introduction to AT Commands General Syntax of Extended AT Commands Result Codes of AT Commands AT Command Operations: Test, Set, Read, Execution Checking if the Use of AT Commands to Send, Receive and Read SMS Messages is Supported Operating Mode: SMS Text Mode and SMS PDU Mode Setting/Reading the SMSC Address (AT+CSCA) Preferred Message Storage (AT+CPMS) Writing SMS Messages to Message Storage (AT+CMGW) Deleting SMS Messages from Message Storage (AT+CMGD) Sending SMS Messages from a Computer / PC (AT+CMGS, AT+CMSS) Reading SMS Messages from Message Storage (AT+CMGR, AT+CMGL) How to Choose an SMS Gateway Provider Comparison Table of SMS Gateway Providers Free SMS Software/Tools and Libraries GSM 7-bit Default Alphabet Table (with ISO 8859-1) SMS on Windows PC (Non-Developers) SMS on Linux PC (Non-Developers)

WAP CSS / WCSS Tutorial



Preferences - Do not show ads

WCSS (WAP CSS, also known as Wireless CSS or Wireless Profile CSS) is the cascading style sheet language that is used with XHTML MP. It is based on CSS2. Like XHTML MP, WCSS is defined in WAP 2.0.

At the beginning of our WCSS tutorial, we will mention about what WCSS is, the advantages and disadvantages of using WCSS on your WAP site, WCSS's syntax, etc. After that we will look at different ways to apply WCSS cascading style sheets to XHTML MP documents, WCSS selectors, and some of the commonly used WCSS properties. The last part of our WCSS tutorial includes an in depth coverage of the three WAP specific extensions to CSS2 and a brief discussion of how to detect the type of a user agent and apply the appropriate WCSS style sheet to it.


Table of Contents

WCSS (WAP CSS) Introduction

What is WCSS (WAP CSS)?

MIME Type and File Extension of WCSS Files

Wireless CSS and Wireless Profile CSS

Advantages of Using WAP CSS Style Sheets on Mobile Internet Sites

Disadvantages of Using WAP CSS Style Sheets on Mobile Internet Sites

Syntax Rules of WCSS

Comments in WCSS

How to Apply WCSS Styles to an XHTML MP Document

Link to an External Cascading Style Sheet

Place WCSS Styles at the Document Head (Internal Style Sheet)

Specify WCSS Styles with the Style Attribute (Inline Styles)

Different Types of Selectors

Type Selector

Class Selector

ID Selector

Universal Selector

Div and Span Element of XHTML MP

The Div Element

The Span Element

Cascading Rules for Handling Multiple Groups of WCSS Styles Applied to the Same Element

Common Types of Property Value

Length

Color

URL

WCSS Font and Text Properties

Setting Specific Font Names or Generic Font Family Names (font-family Property)

Setting the Font Size (font-size Property)

Setting the Font Style: Italic, Bold and Underline (font-style, font-weight and text-decoration Properties)

Setting Text Alignment (text-align and float Properties)

WCSS List Properties

Changing the Bullet Shape of Unordered Lists (list-style-type Property)

Changing the Sequence Value Type of Ordered Lists (list-style-type Property)

Using Image Files as List Bullets (list-style-image Property)

WCSS Color Properties

Setting Foreground and Background Colors (color and background-color Properties)

WCSS Border Properties

Setting the Border Style (border-style Property)

Setting the Border Width (border-width Property)

Setting the Border Color (border-color Property)

Shorthand Properties for Setting Border Style, Width and Color All at Once

Example: Applying WAP CSS Border Properties to Tables

WAP Specific Extensions to CSS

WCSS Access Key Extension

Specifying Keypad Shortcuts for Elements (-wap-accesskey Property)

WCSS Input Extension

Controlling the Type and Number of Characters to be Entered in Text Fields (-wap-input-format Property)

Controlling Whether Text Fields can be Left Empty (-wap-input-required Property)

WCSS Marquee Extension

Enabling Content Scrolling Across the Screen of Mobile Devices (-wap-marquee Property Value)

Controlling the Direction of Marquee Animations (-wap-marquee-dir Property)

Repeating the Marquee Animation a Number of Times (-wap-marquee-loop Property)

Controlling the Speed of Marquee Animations (-wap-marquee-speed Property)

Controlling the Style of Marquee Animations (-wap-marquee-style Property)

Scroll Marquee Style

Slide Marquee Style

Alternate Marquee Style

Matching WCSS Cascading Style Sheets to Different User Agents

How to Detect User Agents?

How to Read the Value of a HTTP Header?

How to Match WCSS Cascading Style Sheets to Different User Agents?



Google