CodePen

HTML

            
              <h2>Image replaced with Image</h2>
<img class="image-replacement" src="http://akamaicovers.oreilly.com/images/9781593272869/cat.gif" />

<h2>Text Replaced with Image<h2>
<div class="text-replacement">Some text to replace here</div>
            
          
!
via HTML Inspector

CSS

            
              .image-replacement {
  display: block;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  background: url(http://akamaicovers.oreilly.com/images/9780596517748/cat.gif) no-repeat;
  width: 180px;
  height: 236px;
  padding-left: 180px;
}

.text-replacement {
  display: block;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  height: 250px;
  width: 250px;
  padding-top: 250px;
  overflow: hidden;
  background: #333 url(http://cdn.css-tricks.com/wp-content/themes/CSS-Tricks-10/images/footer-logo-shoptalk.png) no-repeat;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................