-moz-border-top-colors

This article is in need of an editorial review.

« CSS « CSS Reference « Mozilla Extensions

Summary

In Mozilla applications like Firefox, the -moz-border-top-colors CSS property sets a list of colors for the top border.

When an element has a border that is larger than a single CSS pixel, each line of pixels uses the next color specified in this property, from the outside in. This eliminates the need for nested boxes. If the border is wider than the number of specified colors, the remaining part of the border is the innermost color specified.

  • Initial value: none
  • Applies to: all elements
  • Inherited: no

It does not apply

  1. if border-style is dashed or dotted.
  2. to tables with border-collapse: collapse.

Syntax

-moz-border-top-colors:  [<color>]* <color> | none

Values

Accepts a white-space separated list of color values.

<color>
Specifies the color of a line of pixels in the bottom border. transparent is valid. See <color> values for possible units.
none
Default, no colors are drawn or border-color is used, if specified.

Examples

/*  Other browsers use a "inset gold 10px" border  */

border: inset gold 10px;  color:gold;  background:gray;  padding:1em;
-moz-border-top-colors:    #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0;
-moz-border-right-colors:   red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0;
-moz-border-bottom-colors:  red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0;
-moz-border-left-colors:   #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0;
/*  Other browsers use a "solid 1.5em" border  */

border: solid 1.5em;  -moz-border-radius:1.5em;  border-radius:1.5em;
-moz-border-top-colors:    maroon maroon khaki maroon khaki maroon maroon transparent;
-moz-border-right-colors:  maroon maroon khaki maroon khaki maroon maroon magenta;
-moz-border-bottom-colors: maroon maroon khaki maroon khaki maroon maroon transparent;
-moz-border-left-colors:   maroon maroon khaki maroon khaki maroon maroon transparent;

Specifications

 

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support Not supported 1.0 Unknown (1.3) Not supported Not supported Not supported
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support Not supported Not supported ? Not supported Not supported Not supported

See also

border-color

Document Tags and Contributors

Contributors to this page: Sheppy, Fredchat, Spanglerco, Jürgen Jeka, Marsf, Kravimir, sawrubh, Mgjbot
Last updated by: Kravimir,