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
Click on the tag that creates a cell in table
<tr> <span> <td>
<table></tr>
  <td>Cell-1</td><td>Cell-2</td>
</tr></table>
Indicate the CSS property used to specify a background image for an element
background-color background-image color
h3 {
  background-image: url("image.jpg");
}
What instruction can be used to parse all the array items?
for() array() object()
var arr = [1, "ab", "CoursesWeb.net"];
for(var i=0; i< arr.length; i++) { alert(arr[i]); };
Indicate the PHP instruction used to traverse an associative array.
for() foreach() if()
$arr = array("k1"=>"v1", "k2"=>"v2", "k3"=>"v3");
foreach($arr AS $k => $v) { echo "<br/>". $k ." - ". $v; }
CSS Outline

Last accessed pages

  1. Working with getElementsByTagName (871)
  2. PHP PDO - Select query, fetch (1437)
  3. Multiple Select Dropdown List with AJAX (1788)
  4. EasyPhpThumbnail Class (90)
  5. Recursive function to create Multi-Level Menu in JavaScript (91)

Top accessed pages

  1. PHP-MySQL free course, online tutorials PHP MySQL code (3437)
  2. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (3288)
  3. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (3258)
  4. Get Attribute (ID, Class, Name, Title, Src) with jQuery (3042)
  5. PHP Chat Script (2708)