HTML & CSS Wiki
Register
m (Reverted edits by 209.107.210.46 (talk | block) to last version by Jesdisciple)
No edit summary
 
Line 3: Line 3:
   
 
===Values===
 
===Values===
*<code><[[outline-width]]></code> - Any of the values for the <code>outline-width</code> property can be used to specify the thickness of the outline.
+
*<code><[[outline-width]]></code> - Any of the values for the <code>outline-width</code> property can be used to specify the thickness of the outline.
 
*<code><[[outline-style]]></code> - Any of the values for the <code>outline-style</code> property can be used to specify the linetype of the outline.
 
*<code><[[outline-style]]></code> - Any of the values for the <code>outline-style</code> property can be used to specify the linetype of the outline.
 
*<code><[[outline-color]]></code> - Any of the values for the <code>outline-color</code> property can be used to specify the color of the outline.
 
*<code><[[outline-color]]></code> - Any of the values for the <code>outline-color</code> property can be used to specify the color of the outline.
Line 26: Line 26:
 
==Firefox 1.5==
 
==Firefox 1.5==
 
{{Bad|'''obsolete, [[Cross-Browser Compatibility|browser-specific]]''' property}}
 
{{Bad|'''obsolete, [[Cross-Browser Compatibility|browser-specific]]''' property}}
 
 
The [[CSS]] '''<code>-moz-outline</code>''' property was a [[Mozilla]] extension used in [[Firefox]] 1.5 and before as a substitute for the standard <code>[[outline#WikiaArticle|outline]]</code> property, which is now fully supported.
 
The [[CSS]] '''<code>-moz-outline</code>''' property was a [[Mozilla]] extension used in [[Firefox]] 1.5 and before as a substitute for the standard <code>[[outline#WikiaArticle|outline]]</code> property, which is now fully supported.
 
 
[[Category:CSS Properties]]
 
[[Category:CSS Properties]]

Latest revision as of 22:07, 7 April 2020

The outline property is used in CSS and certain HTML elements. It creates an outline around the selected object, rendering each side the same as the others. A background-color is not necessary for this property to work. The padding property can also be used to specify the outline wrapping around the text.


Values

  • <outline-width> - Any of the values for the outline-width property can be used to specify the thickness of the outline.
  • <outline-style> - Any of the values for the outline-style property can be used to specify the linetype of the outline.
  • <outline-color> - Any of the values for the outline-color property can be used to specify the color of the outline.


HTML example:

<span style="outline:thin solid black;">Outline this text</span>

That produces: outline this text

CSS example:

h1 {
    outline:5px solid black;
}

Firefox 1.5

This obsolete, browser-specific property is not recommended. Authors should generally find an alternative way to accomplish the same task while adhering to all best practices, or simply do without it if it is unimportant.


The CSS -moz-outline property was a Mozilla extension used in Firefox 1.5 and before as a substitute for the standard outline property, which is now fully supported.