Page Widget How to - Set sub-properties of border separately








Question

We would like to know how to set sub-properties of border separately.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
* {<!--from  ww w.  jav  a  2s. co  m-->
  border-style: solid;
  border-width: 0px;
}

#foo {
  background: red;
  border-width: 10px;
  border-color: green;
}
</style>
</head>
<body>
  <p id="foo">something</p>
</body>
</html>

The code above is rendered as follows: