In some of the websites you may have noticed that they have divided the main area and sidebar through the borders properties. The border property is very easy and you can sketch a border around any div. Like we can do it in CSS
. ImgNow a days web designers use advance coding in order to make some div in a prominent way. This gives a stylish look to the box. After the release of CSS3, the friendly coding enhanced the CSS and defined the box shadow property in a unique form.
{width:300px; border:1 px solid #333}
Box has shadow around its four corners and gives it a good look. Likewise you can apply box shadow to the left and right side as well
Example of CSS3 Box shadow
-webkit-box-shadow: 3px 0px 30px rgba(50, 50, 50, 1);
-moz-box-shadow: 3px 0px 30px rgba(50, 50, 50, 1);
box-shadow: 3px 0px 30px rgba(50, 50, 50, 1);
- Horizontal Length
- Vertical Length
- Blur
- Opacity to RGBA
Shadow On the Right Side of the Box
For applying shadow on the right side of the box. We will decrease the value of Vertical Length to zero and the rest of the code will be same.-webkit-box-shadow: 3px 0px 2px 2px rgba(50, 50, 50, 1);
box-shadow: 3px 0px 2px 2px rgba(50, 50, 50, 1);
You can change the value of Blur and Spread as per your requirement.
Shadow on the Left side of the Box
The code will be same but we will decrease the value of Horizontal Length to -3.
-webkit-box-shadow: -3px 0px 2px 2px rgba(50, 50, 50, 1);
box-shadow: -3px 0px 2px 2px rgba(50, 50, 50, 1);
Shadow on the Top and Bottom of the Box
Here in this case you will apply the Horizontal Length zero and the Vertical Length to some value.Bottom
-webkit-box-shadow: 0px 3px 2px 2px rgba(50, 50, 50, 1);
box-shadow: 0px 3px 2px 2px rgba(50, 50, 50, 1);
Top
-webkit-box-shadow: 0px -3px 2px 2px rgba(50, 50, 50, 1);
box-shadow: 0px -3px 2px 2px rgba(50, 50, 50, 1);
Dear readers, after reading the Content please ask for advice and to provide constructive feedback Please Write Relevant Comment with Polite Language.Your comments inspired me to continue blogging. Your opinion much more valuable to me. Thank you. ConversionConversion EmoticonEmoticon