CodePen

HTML

            
              <div>
  <span>1</span>
  <span>2</span>
  <span>3</span>
  <span>4</span>
</div>

<div class="no-width">
  <span>1</span>
  <span>2</span>
  <span>3</span>
  <span>4</span>
</div>

<h2>Ice Cream Sandwich Screenshot</h2>

<p><img src="http://dl.dropbox.com/u/30190351/android-browser-inline-block-ics.png" width="1280" height="800" alt="Screenshot of result in Androd Browser" /></p>

<h2>Jellybean Screenshot</h2>

<p><img src="http://dl.dropbox.com/u/30190351/android-browser-inline-block-jb.png" width="720" height="1280" alt="Screenshot of result in Androd Browser" /></p>
            
          
!

CSS

            
              div {
  background: #ff0;
  font-family: sans-serif;
  font-size: 0;
  width: 300px;
}

span {
  background: #00f;
  color: #fff;
  display: inline-block;
  font-size: 20px;
  text-align: center;
  width: 20%;
}

.no-width span {
  width: auto;
}

span:nth-child(2) {
  background: #f00;
}

span:nth-child(3) {
  background: #f0f;
}

span:nth-child(4) {
  background: #0f0;
  color: #000;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

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