You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > MozAppearance
MozAppearance style property | webkitAppearance style property
MozAppearance | ||||||
webkitAppearance |
Specifies or retrieves theme rendering mode for an element. Allows you to make an element look like a standard user interface element.
With this property you can reach the user settings in the userChrome.css file, so your application uses the same design settings as the user's browser.
This property is very useful if you develop an application under Firefox, Google Chrome or Safari.
Syntax:
You can find the related objects in the Supported by objects section below.
MozAppearance: | This property is read/write. |
webkitAppearance: | This property is read/write. |
CSS page for this property: -moz-appearance |
Possible values:
The type of this property is string.
One of the following values:
Use Macintosh unified toolbar theme for rendering the object. Supported in Firefox from version 3.5. | |||||||
Use the browser's tabbar toolbox theme for rendering the object. | |||||||
Use communications toolbox theme for rendering the object. | |||||||
Use media toolbox theme for rendering the object. | |||||||
Use button theme for rendering the object. | |||||||
Use button bevel theme for rendering the object. | |||||||
Use small button theme for rendering the object. | |||||||
Use caret theme for rendering the object. | |||||||
Use checkbox theme for rendering the object. | |||||||
Use checkbox container theme for rendering the object. | |||||||
Use small checkbox theme for rendering the object. | |||||||
Use dialog theme for rendering the object. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Use listbox theme for rendering the object. | |||||||
Use listitem theme for rendering the object. | |||||||
Use menu theme for rendering the object. | |||||||
Use menulist theme for rendering the object. | |||||||
Use menulist button theme for rendering the object. | |||||||
Use menulist text theme for rendering the object. | |||||||
Use menulist textfield theme for rendering the object. | |||||||
Do not use any widget theme. | |||||||
Use progressbar theme for rendering the object. | |||||||
Use push button theme for rendering the object. | |||||||
Use radio theme for rendering the object. | |||||||
Use radio container theme for rendering the object. | |||||||
Use small radio theme for rendering the object. | |||||||
Use scrollbar theme for rendering the object. | |||||||
Use down scrollbarbutton theme for rendering the object. | |||||||
Use left scrollbarbutton theme for rendering the object. | |||||||
Use right scrollbarbutton theme for rendering the object. | |||||||
Use up scrollbarbutton theme for rendering the object. | |||||||
Use horizontal scrollbargripper theme for rendering the object. | |||||||
Use vertical scrollbargripper theme for rendering the object. | |||||||
Use horizontal scrollbarthumb theme for rendering the object. | |||||||
Use vertical scrollbarthumb theme for rendering the object. | |||||||
Use horizontal scrollbartrack theme for rendering the object. | |||||||
Use vertical scrollbartrack theme for rendering the object. | |||||||
Use searchfield theme for rendering the object. | |||||||
Use the searchfield's cancel button theme for rendering the object. | |||||||
Use the searchfield theme for rendering the object. | |||||||
Use the searchfield's results button theme for rendering the object. | |||||||
Use the searchfield's results decoration theme for rendering the object. | |||||||
Use separator theme for rendering the object. | |||||||
Use horizontal slider theme for rendering the object. | |||||||
Use vertical slider theme for rendering the object. | |||||||
Use horizontal sliderthumb theme for rendering the object. | |||||||
Use vertical sliderthumb theme for rendering the object. | |||||||
Use square button theme for rendering the object. | |||||||
Use statusbar theme for rendering the object. | |||||||
Use tab theme for rendering the object. | |||||||
Use left-edge of tab theme for rendering the object. | |||||||
Use tabpanels theme for rendering the object. | |||||||
Use textarea theme for rendering the object. | |||||||
Use textfield theme for rendering the object. | |||||||
Use toolbar theme for rendering the object. | |||||||
Use toolbarbutton theme for rendering the object. | |||||||
Use toolbox theme for rendering the object. | |||||||
Use tooltip theme for rendering the object. | |||||||
Use treeheadercell theme for rendering the object. | |||||||
Use treeheadersortarrow theme for rendering the object. | |||||||
Use treeitem theme for rendering the object. | |||||||
Use treetwisty theme for rendering the object. | |||||||
Use treetwistyopen theme for rendering the object. | |||||||
Use treeview theme for rendering the object. |
Default: none.
Example HTML code 1:
This example illustrates the use of the -moz-appearance and the -webkit-appearance properties:
|
||||
<head> <style> .example { -moz-appearance: menulist-button; -webkit-appearance: menulist-button; } </style> </head> <body> <button class="example">toolbar like button</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the MozAppearance and webkitAppearance properties in JavaScript:
|
||||
<head> <script type="text/javascript"> function ChangeApp (selectTag) { // Returns the index of the selected option var whichSelected = selectTag.selectedIndex; // Returns the text of the selected option var appType = selectTag.options[whichSelected].text; var button = document.getElementById ("myButton"); if ('MozAppearance' in button.style) { button.style.MozAppearance = appType; } else if ('webkitAppearance' in button.style) { button.style.webkitAppearance = appType; } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <table> <tr> <td style="vertical-align:middle;"> <button id="myButton">Change MozAppearance!</button> </td> <td> <select onchange="ChangeApp (this);" size="39"> <option />none <option />button <option />button-small <option />checkbox <option />checkbox-container <option />checkbox-small <option />dialog <option />listbox <option />menu <option />menulist <option />menulist-button <option />menulist-textfield <option />progressbar <option />radio <option />radio-container <option />radio-small <option />scrollbar <option />scrollbarbutton-down <option />scrollbarbutton-left <option />scrollbarbutton-right <option />scrollbarbutton-up <option />scrollbartrack-horizontal <option />scrollbartrack-vertical <option />separator <option />statusbar <option />tab <option />tab-left-edge <option />tabpanels <option />textfield <option />toolbar <option />toolbarbutton <option />toolbox <option />tooltip <option />treeheadercell <option />treeheadersortarrow <option />treeitem <option />treetwisty <option />treetwistyopen <option />treeview </select> </td> </tr> </table> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
CSSStyleDeclaration, htmlElement.style
HTML elements:
a, abbr, acronym, address, applet, b, bdo, big, blink, blockquote, body, button, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, hr, html, i, iframe, img, input:button, input:checkbox, input:file, input:image, input:password, input:radio, input:range, input:reset, input:search, input:submit, input:text, ins, isindex, kbd, label, legend, li, marquee, menu, object, ol, p, pre, q, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp
External links:
-moz-appearance (Mozilla Developer Center)
-webkit-appearance (Safari Reference Library)
appearance (W3C)
-webkit-appearance (Safari Reference Library)
appearance (W3C)
User Contributed Comments