HTML Element Style How to - Position div with inline-block


We would like to know how to position div with inline-block.


<!DOCTYPE html>
<style type='text/css'>
#nav {<!--from   w w w.j ava 2  s .c  o  m-->
  position: absolute;
  top: 0;
  right: 0;

#nav div {
  width: 120px;
  height: 40px;
  display: inline-block;
  vertical-align: bottom;

#nav div+div {
  margin-left: 10px;

.red {
  background-color: #f00;

.green {
  background-color: #0f0;

.blue {
  background-color: #00f;
  <div id="nav">
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>

The code above is rendered as follows: