Page Widget How to - Create sidebar style with shadow








Question

We would like to know how to create sidebar style with shadow.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
body {background:#eee;}
p {line-height:1.5em;}
<!-- ww  w. jav a 2  s.  co  m-->
#patch {
   width:220px; 
   margin:10px; 
   padding:20px; 
   background:#fff; 
   border-radius:5px; 
   border: 1px dashed #ccc; 
   box-shadow:0px 0px 0px 5px #fff;
}
</style>
</head>
<body>
  <div id="patch">
    <p>Lorem <a href="#">ipsum dolor</a> sit amet, consectetur adipiscing elit. Duis non felis neque. Pellentesque eleifend arcu a elit adipiscing porttitor molestie mi iaculis. Aliquam ac nisi at ligula ullamcorper tempor ut et diam.</p>
    <p>Lorem <a href="#">ipsum dolor</a> sit amet, consectetur adipiscing elit. Duis non felis neque. Pellentesque eleifend arcu a elit adipiscing porttitor molestie mi iaculis. Aliquam ac nisi at ligula ullamcorper tempor ut et diam.</p>
</div>
</body>
</html>

The code above is rendered as follows: