Outlines are special visual properties similar to border, but take up no space in the layout. They will highlight an item without shifting its position.
An outline is a line that is drawn around elements, outside the border edge, to make the element "stand out". It specifies the style, color, and width of an outline, but don't have separate definitions for each of the four sides.

outline-color

The outline-color property sets the color of an outline.
  - Values:   - Syntax:

The "outline-color" does not work if it is used alone. You need to define the "outline-style" property before the "outline-color".

outline-style

The outline-style property specifies what kind of line to display. You can define one of the fallowing values: - none specifies no outline. In the image below you can see the effect of the other values:
css outline-style
  - Syntax:

outline-width

The outline-width sets the size of the border.
  - Values:   - Syntax:
  Example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
 <title>outline</title>
 <style type="text/css"><!--
 #idd {
  outline-style: dashed;
  outline-width: 2px;
  outline-color: blue;
 }
 --></style>
</head>
<body>
 <div id="idd">Free Web Development courses and resources.</div>
</body>
</html>
  - Result:
Free Web Development courses and resources

outline shorthand

Using the outline shorthand property you can shorten the code. It accept three values representing outline-width, outline-style, and outline-color.
  - Syntax:
The CSS code from the above example can be rewritten like this (the effect is the same):
#idd { outline: 2px dashed blue; }

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
What attribute makes a radio button or checkbox input selected?
checked="checked" selected="selected" disabled="disabled"
<input type="checkbox" name="a_name" value="value" checked="checked" />
What CSS value scales the background image to the largest size contained within the element?
repeat-x contain linear-gradient
#id {
  background:url("path_to_image.png");
  background-size:contain;
  background-repeat:no-repeat;
}
What operator is used to determine the rest of the division of two numbers?
% * /
var rest8_7 = 8 % 7;
alert(rest8_7);
Indicate the PHP function that rounds a number up to the next highest integer.
floor() ceil() abs()
$nr = ceil(3.5);
echo $nr;        // 4
CSS Outline

Last accessed pages

  1. Bubble Tanks 3 (9581)
  2. Force Download files with PHP (508)
  3. PHP OOP - Constructor Method (1986)
  4. Adding text with ActionScript 3 (1658)
  5. jqPlot Charts (2040)

Top accessed pages

  1. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (24435)
  2. PHP-MySQL free course, online tutorials PHP MySQL code (21284)
  3. Get Attribute (ID, Class, Name, Title, Src) with jQuery (20654)
  4. Read Excel file data in PHP - PhpExcelReader (18199)
  5. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (18082)