developer sign in
where » create » reference » stylesheet

<stylesheet>


The stylesheet element defines a loadable set of styles which are saved to non-volatile memory and are available for use during a browser session by including the stylesheet element in the body of a page. It is more efficient both in processing and in memory consumption to provide a style sheet.

Example

Included in the body element:

<stylesheet id="whereStyle" src="../../../jin/style/whereStyle.jsp">

Sample content of a remote stylesheet:

<stylesheet>  
      <style id="bodyStyle">  
            <bg>0x000000</bg>  
      </style>  
      <style id="popStyle">  
            <align>left</align>  
            <valign>bottom</valign>    
      </style>  
      <style id ="popListStyle">  
            <border>0</border>  
            <fg>0xFFFFFF</fg>  
            <bg>0x000000</bg>  
            <fgfocus>0xCF5719</fgfocus>  
            <bgfocusimg>http://www.where.com/images/dd/mobile/176/over_bg_menu.png</bgfocusimg>  
            <fontsize>small</fontsize>  
      </style>  
      <style id="listStyle">  
            <border>0</border>  
            <fg>0xFFFFFF</fg>  
            <bg>0x000000</bg>      
            <fgfocus>0xCF5719</fgfocus>      
            <bgfocusimg>http://www.where.com/images/dd/mobile/176/over_bg.png</bgfocusimg>  
            <bgimg>http://www.where.com/images/dd/mobile/176/home_bg.png</bgimg>      
            <fontsize>small</fontsize>  
      </style>  
      <style id="layerStyle">  
            <bg>0x000000</bg>  
            <fg>0xCF5719</fg>  
            <border>1</border>  
            <bordercolor>0xCF5719</bordercolor>  
            <fontsize>small</fontsize>  
      </style>  
</stylesheet>  

Applying a style to an element:

<body style="bodyStyle"> ...

<list style="listStyle"> ...

Valid Elements

none

Element Specific Attributes

Attribute  Purpose Values Default JIN
id
REQUIRED
The name of the stylesheet. CDATA none 2.0
src
REQUIRED
The URL of the stylesheet. URL none 2.0

Valid Attributes

Tips and Tricks

It is recommended that you save the addition of a stylesheet as the last step before making it production ready. The stylesheet will be cached on the phone and can only be removed by clearing the non-volatile memory.

Applying a style to an element will override all cascaded style attributes from parent elements. A style applied to an element, however, will cascade its style to all child elements.
terms of use | privacy policy | about | FAQ | blog | jobs | contact us
For 24/7 support email support@where.com or call 888-262-1150
WHERE™ is a product from uLocate Communications, Inc. ©2007 All Rights Reserved.