Split, Fractured Text

See the Pen Strikethrough, Fractured, Split Text by Brandon Himpfen (@brandonhimpfen) on CodePen.16787

HTML

<h1 contenteditable data-heading="Split">Split</h1>

CSS

h1 {
  color: black;
}
h1::before, h1::after {
  content: attr(data-heading);
  position: absolute;
  left: 0;
  overflow: hidden;
}
h1::before {
  height: 50%;
  color: white;
  text-shadow: 3px -2px 5px white, -3px 3px 4px white;
}
h1::after {
  -webkit-transform: translateX(-10px);
          transform: translateX(-10px);
  height: 49%;
  color: black;
}

html {
  height: 100vh;
}

body {
  font-family: 'Roboto', sans-serif;
  height: 100vh;
}

h1 {
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  position: absolute;
  margin: 0;
  font-size: 10vw;
  font-weight: 900;
  text-transform: uppercase;
}

JavaScript

var h1 = document.querySelector("h1");

h1.addEventListener("input", function() {
    this.setAttribute("data-heading", this.innerText);
});

Highlight Text

See the Pen Highlight Text by Brandon Himpfen (@brandonhimpfen) on CodePen.16787

HTML

<p class="">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac <span class="highlighted">tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo</span>.</p>

CSS

html {
  font-family: Avenir, Helvetica, san-serif;
  margin: 3rem 5rem;
}
p {
  font-size: 200%;
}
.highlighted {
  background-color: yellow;  
}

Vertical Text

See the Pen Vertical Text by Brandon Himpfen (@brandonhimpfen) on CodePen.16787

HTML

<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>

CSS

html {
  font-family: Avenir, Helvetica, san-serif;
  margin: 3rem  auto;
}
p {
  writing-mode: vertical-rl;
  font-size: 200%;
  margin: auto;
}

Search Engine Ranking Factors

Search Engine Ranking Factors is a digital book that discusses approximately 200 factors that search engines use to rank your website.

Learn how to optimize your web pages, which will have a huge impact on your pages’ ability to rank.

PDF ISBN: 978-0-9784316-1-7
EPUB ISBN: 978-1-77442-012-6
MOBI ISBN: 978-1-77442-013-3

Facebook Button using Bootstrap

See the Pen
Facebook Button for Bootstrap
by Brandon Himpfen (@brandonhimpfen)
on CodePen.

HTML

<a href="#" title="Facebook" class="btn btn-facebook btn-lg"><i class="fa fa-facebook fa-fw"></i> Facebook</a>

CSS

.btn-facebook {
	  background: #3B5998;
	  border-radius: 0;
	  color: #fff;
	  border-width: 1px;
	  border-style: solid;
	  border-color: #263961; 
	}
	.btn-facebook:link, .btn-facebook:visited {
	  color: #fff;
	}
	.btn-facebook:active, .btn-facebook:hover {
	  background: #263961;
	  color: #fff;
	}

highlight.js Example

See the Pen
highlight.js Example
by Brandon Himpfen (@brandonhimpfen)
on CodePen.

HTML

<div class="container">
<pre><code class="javascript">
$(document).ready(function() {
  $('pre code').each(function(i, block) {
    hljs.highlightBlock(block);
  });
});
</code></pre>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

Search Button using Bootstrap

See the Pen Search Button using Bootstrap by Brandon Himpfen (@brandonhimpfen) on CodePen.16787

HTML

<div class="container">
<div class="input-group">
	<input type="text" class="form-control" placeholder="Search for...">
      <span class="input-group-btn">
        <button class="btn btn-search" type="button"><i class="fa fa-search fa-fw"></i> Search</button>
      </span>
</div>
</div>

CSS

.btn-search {
	  background: #424242;
	  border-radius: 0;
	  color: #fff;
	  border-width: 1px;
	  border-style: solid;
	  border-color: #1c1c1c;
	}
	.btn-search:link, .btn-search:visited {
	  color: #fff;
	}
	.btn-search:active, .btn-search:hover {
	  background: #1c1c1c;
	  color: #fff;
	}