{"id":2283,"date":"2017-04-12T08:09:45","date_gmt":"2017-04-12T08:09:45","guid":{"rendered":"http:\/\/cssreset.com\/?p=2283"},"modified":"2017-04-10T18:15:30","modified_gmt":"2017-04-10T18:15:30","slug":"using-css-to-create-a-stitched-text-effect","status":"publish","type":"post","link":"https:\/\/cssdeck.com\/blog\/using-css-to-create-a-stitched-text-effect\/","title":{"rendered":"Using CSS to Create a Stitched Text Effect"},"content":{"rendered":"<p>Here&#8217;s another fun text effect you can easily create using only a few lines of CSS. With this effect, you can give any text the appearance of being surrounded by hand-stitching. To see how it&#8217;s done, check out the tutorial below:<\/p>\n<p>To start, you&#8217;ll need some text in your HTML. Give it a class of &#8220;stitched&#8221; (or something similar).<\/p>\n<pre>&lt;div id=\"stiched\"&gt;STITCHED&lt;\/div&gt;<\/pre>\n<p>We put the text in a div rather than a classic text tag (like h1, for example) because then there won&#8217;t be any inherent browser styling for the text that we have to override. To achieve the stitching effect, you&#8217;ll need to apply the following CSS to your div tag:<\/p>\n<pre>#stiched {\r\n outline: 2px dashed #777;\r\n outline-offset: -15px; \r\n background-color: #555;\r\n height: 150px;\r\n width: 500px;\r\n margin: 20px auto;\r\n box-shadow: 2px 2px 2px #111;\r\n -webkit-box-shadow: 2px 2px 2px #111;\r\n -moz-box-shadow: 2px 2px 2px #111;\r\n font-family: \"Open Sans\", \"Gill Sans\", sans-serif;\r\n font-size: 100px;\r\n text-align: center;\r\n line-height: 150px;\r\n color: #DDDDDD\r\n}<\/pre>\n<p>Now your text should look like this:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-large wp-image-2284 aligncenter\" alt=\"Screen Shot 2017-03-02 at 10.57.26 AM\" src=\"https:\/\/cssdeck.com\/blog\/\/wp-content\/uploads\/2017\/03\/Screen-Shot-2017-03-02-at-10.57.26-AM-1024x339.png\" width=\"1024\" height=\"339\" srcset=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/03\/Screen-Shot-2017-03-02-at-10.57.26-AM-1024x339.png 1024w, https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/03\/Screen-Shot-2017-03-02-at-10.57.26-AM-300x99.png 300w, https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/03\/Screen-Shot-2017-03-02-at-10.57.26-AM-180x59.png 180w, https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/03\/Screen-Shot-2017-03-02-at-10.57.26-AM.png 1044w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>As you might be able to tell, the stitched effect is achieved by using the outline property and making it dashed rather than solid. Using the outline offset property makes the dash appear within the div, rather than outside of it\/on the border of it (learn more about the outline property by reading our outline vs. border <a href=\"https:\/\/cssdeck.com\/blog\/\/css-tips-outline-vs-border\/\" target=\"_blank\">tutorial<\/a>).<\/p>\n<p>We also use properties like box-shadow and background-color to give the stitched text more color and dimension. As always, colors, sizes, and font families are totally customizable &#8212; have fun with the code and change it to suit your own style or the style of your projects. Unlike some of the other text effect tutorials on this site, this one is pretty easy to customize (especially in terms of color) without ruining the effect. If you like this text effect, make sure you check out our <a href=\"https:\/\/cssdeck.com\/blog\/\/create-a-burning-text-effect-with-css3\/\" target=\"_blank\">other<\/a> text effect <a href=\"https:\/\/cssdeck.com\/blog\/\/create-an-anaglyphic-text-effect-using-css\/\" target=\"_blank\">tutorials<\/a>!<\/p>\n<div class=\"wp-socializer wpsr-share-icons \" data-lg-action=\"show\" data-sm-action=\"show\" data-sm-width=\"768\" ><h3>Share and Enjoy !<\/h3><div class=\"wpsr-si-inner\"><div class=\"wpsr-counter wpsrc-sz-32px\" style=\"color:#000\"><span class=\"scount\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook,twitter,linkedin,pinterest,print,pdf\">0<\/span><\/span><small class=\"stext\">Shares<\/small><\/div><div class=\"socializer sr-popup sr-32px sr-circle sr-opacity sr-pad sr-count-1 sr-count-1\"><span class=\"sr-facebook\"><a rel=\"nofollow\" href=\"https:\/\/www.facebook.com\/share.php?u=\" target=\"_blank\"  title=\"Share this on Facebook\"  style=\"color: #ffffff\" ><i class=\"fab fa-facebook-f\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-twitter\"><a rel=\"nofollow\" href=\"https:\/\/twitter.com\/intent\/tweet?text=%20-%20%20\" target=\"_blank\"  title=\"Tweet this !\"  style=\"color: #ffffff\" ><i class=\"fab fa-twitter\"><\/i><\/a><\/span>\n<span class=\"sr-linkedin\"><a rel=\"nofollow\" href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=\" target=\"_blank\"  title=\"Add this to LinkedIn\"  style=\"color: #ffffff\" ><i class=\"fab fa-linkedin-in\"><\/i><\/a><\/span>\n<span class=\"sr-pinterest\"><a rel=\"nofollow\" href=\"https:\/\/www.pinterest.com\/pin\/create\/button\/?url=&amp;media=&amp;description=\" target=\"_blank\"  title=\"Submit this to Pinterest\"  style=\"color: #ffffff\" data-pin-custom=\"true\"><i class=\"fab fa-pinterest\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"pinterest\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-print\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Print this article \"  style=\"color: #ffffff\" ><i class=\"fa fa-print\"><\/i><\/a><\/span>\n<span class=\"sr-pdf\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Convert to PDF\"  style=\"color: #ffffff\" ><i class=\"fa fa-file-pdf\"><\/i><\/a><\/span><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s another fun text effect you can easily create using only a few lines of CSS. With this effect, you can give any text the appearance of being surrounded by hand-stitching. To see how it&#8217;s done, check out the tutorial [&#8230;]<\/p>\n<p><a class=\"more-link article\" href=\"https:\/\/cssdeck.com\/blog\/using-css-to-create-a-stitched-text-effect\/\" title=\"Click to read 'Using CSS to Create a Stitched Text Effect'\">Read Article<\/a><\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/2283"}],"collection":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/comments?post=2283"}],"version-history":[{"count":1,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/2283\/revisions"}],"predecessor-version":[{"id":2285,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/2283\/revisions\/2285"}],"wp:attachment":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/media?parent=2283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/categories?post=2283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/tags?post=2283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}