CSS Property Value How to - outline: 5px solid #ff0000;








Question

We would like to know how to outline: 5px solid #ff0000;.

Answer


<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css">
p.one {<!--   w  w  w . j  av a  2 s . com-->
  outline: 5px solid #ff0000;
}

p.two {
  color: #00ff00;
  outline: 5px solid;
}
</style>
</head>
<body>
  <p class="one">This is a paragraph.</p>
  <p class="two">This is another paragraph.</p>
  <p>
    <strong>Warning:</strong> Internet Explorer 7 and earlier versions
    don't support the outline property. IE8 supports the outline
    properties only if a
    <code>&lt;!DOCTYPE&gt;</code>
    is specified.
  </p>
</body>
</html>

The code above is rendered as follows: