BEA WebLogic User Manual page 87

Mobility server
Hide thumbs Also See for WebLogic:
Table of Contents

Advertisement

Rules In CSS
A rule is a statement that tells a browser how to draw a particular element on a web page.
A rule has two parts: a selector and a declaration. A selector identifies the elements on a web
page that are affected by the rule. The declaration tells the browser how to display the element
that is selected by the selector.
The preceding example has four rules. There are four selectors: body, h1, p and note. The
declarations for each rule are inside curly braces. Each declaration can contain one or more
properties. A semi-colon separates properties.
Link Style Sheets
External style sheets can be applied to multiple documents. Each document must be linked to the
style sheet in order for the styles to be applied. Placing a link to the style sheet in the head of the
marked up content file does this. When the browser begins reading the page, it sees the style sheet
link, and downloads the style sheet, then uses it to display the page.
To link a web page to a style sheet, place a link to the .css file in the head of the document, using
the following syntax:
<link rel="stylesheet" type="text/css" href="mystyles.css" />
The style sheet should be accessible to all files that use it. Typically, it is placed in the root
directory of the web folder.
Server Side Application of CSS for PDAs
If a style sheet is unavailable, the requesting browser is responsible for applying any internal or
inline styles that are contained in the content file. In the absence of any styles, the browser will
use its own default settings. Some PDA browsers, however, cannot support CSS. In cases like
this, WebLogic Mobility Server will attempt to apply any external or internal styles by translating
them into the nearest equivalent in-line style. The server does this translation before the page is
delivered to the browser.
Use Multiple Device-Specific Style Sheets
When creating a style sheet you can create a single style sheet that applies to all devices, or you
can create multiple specialized style sheets that target particular device types.
Creating multiple style sheets can be easier to maintain and can allow authors to finely tune
content presentation to particular devices. You might decide, for example, to present web content
that is being requested by handheld devices in a smaller font than when it is being requested by a
desktop browser. Specifically, headings can be displayed in a very large font on a desktop
browser, but the smaller screen devices would likely cause this heading to wrap awkwardly.
Multiple style sheets linked to in the document head using the
<mm:include where="UsableScreenWidth > 180">
<link rel="stylesheet" type="text/css" href="mytinystyles.css" />
</mm:include>
<mm:include where="IsLandscapePDA">
<link rel="stylesheet" type="text/css" href="mywidestyles.css" />
</mm:include>
Part IV Presentation of Mobile Content
<mm:include>
BEA WebLogic Mobility Server User Guide - 83
mobility tag.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the WebLogic and is the answer not in the manual?

This manual is also suitable for:

Weblogic mobility server

Table of Contents