Introduction
In this article, we will learn how to provide a Stitched effect using CSS. First, we apply the Stitched effect to a simple box (in other words any div), then we add some background-images and take this trick to the next level.
Let's Begin
Example 1
HTML Structure
<div class="stitched">Stitched</div>
CSS
- .stitched
- {
- background-color:darkred;
- width:200px;
- font-size:20px;
- color:white;
- padding:20px;
- }
Here we set the background-color, width, font-size and so on of the div using the ".stitched" class.
Preview

- .stitched
- {
- background-color:darkred;
- width:200px;
- font-size:20px;
- color:white;
- padding:20px;
- border:2px dashed white;
- border-radius:20px;
- box-shadow:0px 0px 4px 4px darkred;
- }
We have now added a border, border-radius and box-shadow to the ".stitched" class. In the box shadow, we only use blur and spread and set the value to "4px" (box-shadow syntax: box-shadow: h-shadow v-shadow blur spread color).
Preview

That example was a basic example of a stitched effect. Now we will create another Stitched effect.
- <div class="pic">
- <div class="borderdiv">
- <div class="inner"><p class="text1">Stitched</p></div>
- </div>
- </div>





Gakenh01Posted Jan 27, 2014, 1:43 PM
Little use for this. Everyone that knows CSS knows about dashed lines.